W3cubDocs

/Ruby on Rails 5.2

module ActionCable::Channel::Broadcasting::ClassMethods

Public Instance Methods

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

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

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