Class: RepliesChannel

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

Instance Method Summary collapse

Instance Method Details

#follow(data) ⇒ Object


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

def follow(data)
  stop_all_streams
  stream_from "topics/#{data['topic_id']}/replies"
end

#unfollowObject


7
8
9
# File 'app/channels/replies_channel.rb', line 7

def unfollow
  stop_all_streams
end