, 당신은 같이 보낸 사람에게 메시지를 회신 할 수 있습니다 class BoardChannel < ApplicationCable::Channel
def subscribed
stream_from "board:#{params[:board]}"
end
def speak
# client will call @perfor
새로운 Rails 5 (RC1) 앱을 만들고 있습니다. 사용자 인증을 위해 AuthLogic을 사용했으며, ActionCable에 들어갈 때까지 항상 작동합니다. #app/channels/application_cable/connection.rb
module ApplicationCable
class Connection < ActionCable::C
나는 사용자가 온라인 상태인지 여부에 크게 의존하는 코드가 있습니다. 현재 I는 다음과 같이 설정 ActionCable을했습니다 :이 class DriverRequestsChannel < ApplicationCable::Channel
def subscribed
stream_from "requests_#{current_user.id}"
나는 Rails 5.0.0.rc1 + ActionCable + Redis를 사용하여 메신저 응용 프로그램을 만들고 있습니다. 나는 단일 채널 ApiChannel과 그 안에 많은 조치를 가졌습니다. 뭔가 "유니 캐스트"동작이 있습니다. - 무언가를 요청하고, 무언가를 얻고, "브로드 캐스트"동작을 수행합니다. - 무언가를 수행하고, 연결된 일부 클라이언트에게