instance method
broadcast
Ruby on Rails 5.2.8.1
Since v5.2.8.1Signature
broadcast(broadcasting, message, coder: ActiveSupport::JSON)
Broadcast a hash directly to a named broadcasting. This will later be JSON encoded.
Parameters
-
broadcastingreq -
messagereq -
coderkey = ActiveSupport::JSON
Source
# File actioncable/lib/action_cable/server/broadcasting.rb, line 24
def broadcast(broadcasting, message, coder: ActiveSupport::JSON)
broadcaster_for(broadcasting, coder: coder).broadcast(message)
end
Defined in actioncable/lib/action_cable/server/broadcasting.rb line 24
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionCable::Server::Broadcasting