Class: ModelUpdates::ModelChannel

Inherits:
ApplicationCable::Channel
  • Object
show all
Defined in:
app/channels/model_updates/model_channel.rb

Instance Method Summary collapse

Instance Method Details

#subscribedObject



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

def subscribed
  model = params[:model].constantize.find(params[:id])
  stream_for model
end