Class: Collavre::SlideViewChannel

Inherits:
ApplicationCable::Channel
  • Object
show all
Defined in:
app/channels/collavre/slide_view_channel.rb

Instance Method Summary collapse

Instance Method Details

#change(data) ⇒ Object



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

def change(data)
  SlideViewChannel.broadcast_to([ current_user.id, params[:root_id] ], index: data["index"])
end

#subscribedObject



3
4
5
# File 'app/channels/collavre/slide_view_channel.rb', line 3

def subscribed
  stream_for [ current_user.id, params[:root_id] ]
end