W3cubDocs

/Ruby on Rails 5.0

module ActionCable::Channel::Broadcasting

Public Instance Methods

broadcast_to(model, message) Show source

Broadcast a hash to a unique broadcasting for this model in this channel.

# File actioncable/lib/action_cable/channel/broadcasting.rb, line 12
def broadcast_to(model, message)
  ActionCable.server.broadcast(broadcasting_for([ channel_name, model ]), message)
end

© 2004–2017 David Heinemeier Hansson
Licensed under the MIT License.