Method: ActionCable::Server::Broadcasting#broadcast

Defined in:
actioncable/lib/action_cable/server/broadcasting.rb

#broadcast(broadcasting, message, coder: ActiveSupport::JSON) ⇒ Object

Broadcast a hash directly to a named broadcasting. This will later be JSON encoded.



31
32
33
# File 'actioncable/lib/action_cable/server/broadcasting.rb', line 31

def broadcast(broadcasting, message, coder: ActiveSupport::JSON)
  broadcaster_for(broadcasting, coder: coder).broadcast(message)
end