Class: ViewComponent::Live::LiveChannel

Inherits:
ActionCable::Channel::Base
  • Object
show all
Defined in:
app/channels/view_component/live/live_channel.rb

Instance Method Summary collapse

Instance Method Details

#notifyObject



12
13
# File 'app/channels/view_component/live/live_channel.rb', line 12

def notify
end

#subscribedObject



4
5
6
# File 'app/channels/view_component/live/live_channel.rb', line 4

def subscribed
  stream_from "view_component:live:live:#{params[:component]}:#{params[:id]}"
end

#unsubscribedObject



8
9
10
# File 'app/channels/view_component/live/live_channel.rb', line 8

def unsubscribed
  # Any cleanup needed when channel is unsubscribed
end