Method: ActionCable::Server::Broadcasting#broadcast

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

#broadcast(broadcasting, message) ⇒ Object

Broadcast a hash directly to a named broadcasting. It'll automatically be JSON encoded.



22
23
24
# File 'lib/action_cable/server/broadcasting.rb', line 22

def broadcast(broadcasting, message)
  broadcaster_for(broadcasting).broadcast(message)
end