instance method
broadcast_to
Ruby on Rails 5.1.7
Since v5.0.7.2Signature
broadcast_to(model, message)
Broadcast a hash to a unique broadcasting for this model in this channel.
Parameters
-
modelreq -
messagereq
Source
# 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
Defined in actioncable/lib/action_cable/channel/broadcasting.rb line 12
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionCable::Channel::Broadcasting