Class: ChatChannel
- Inherits:
-
ApplicationCable::Channel
- Object
- ApplicationCable::Channel
- ChatChannel
- Defined in:
- app/channels/chat_channel.rb
Instance Method Summary collapse
Instance Method Details
#subscribed ⇒ Object
2 3 4 5 6 7 |
# File 'app/channels/chat_channel.rb', line 2 def subscribed # stream_from "some_channel" stream_from "ChatChannel_#{params[:id]}" puts "subscribed to chat #{params[:id]}" end |
#unsubscribed ⇒ Object
9 10 11 |
# File 'app/channels/chat_channel.rb', line 9 def unsubscribed # Any cleanup needed when channel is unsubscribed end |