Class: CursorChatChannel

Inherits:
ApplicationCable::Channel show all
Defined in:
app/channels/cursor_chat_channel.rb

Instance Method Summary collapse

Instance Method Details

#receive(data) ⇒ Object



6
7
8
# File 'app/channels/cursor_chat_channel.rb', line 6

def receive(data)
  ActionCable.server.broadcast(params[:id], data)
end

#subscribedObject



2
3
4
# File 'app/channels/cursor_chat_channel.rb', line 2

def subscribed
  stream_from params[:id]
end