diff options
author | Jon Moss <me@jonathanmoss.me> | 2016-02-13 21:05:04 -0500 |
---|---|---|
committer | Jon Moss <me@jonathanmoss.me> | 2016-02-17 11:08:00 -0500 |
commit | 05088b6299a39f4eb9b1da95b05d2e14e3c90c8e (patch) | |
tree | fffce935c755af33108219fecc9b1da1b738ff04 /actioncable/lib/action_cable/server/broadcasting.rb | |
parent | 84826b4ea6cdb63f5e338aefd0574c048a35762d (diff) | |
download | rails-05088b6299a39f4eb9b1da95b05d2e14e3c90c8e.tar.gz rails-05088b6299a39f4eb9b1da95b05d2e14e3c90c8e.tar.bz2 rails-05088b6299a39f4eb9b1da95b05d2e14e3c90c8e.zip |
Full Action Cable documentation read through
This PR checks all active Action Cable documentation for typos and other
fixes. It aims to make sure that when Rails 5 is released, that the
Action Cable docs are up to snuff with the other documentation included
with Rails.
[ci skip]
Diffstat (limited to 'actioncable/lib/action_cable/server/broadcasting.rb')
-rw-r--r-- | actioncable/lib/action_cable/server/broadcasting.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actioncable/lib/action_cable/server/broadcasting.rb b/actioncable/lib/action_cable/server/broadcasting.rb index b87232671b..f90fe7b9e2 100644 --- a/actioncable/lib/action_cable/server/broadcasting.rb +++ b/actioncable/lib/action_cable/server/broadcasting.rb @@ -1,6 +1,6 @@ module ActionCable module Server - # Broadcasting is how other parts of your application can send messages to the channel subscribers. As explained in Channel, most of the time, these + # Broadcasting is how other parts of your application can send messages to a channel's subscribers. As explained in Channel, most of the time, these # broadcastings are streamed directly to the clients subscribed to the named broadcasting. Let's explain with a full-stack example: # # class WebNotificationsChannel < ApplicationCable::Channel @@ -9,16 +9,16 @@ module ActionCable # end # end # - # # Somewhere in your app this is called, perhaps from a NewCommentJob + # # Somewhere in your app this is called, perhaps from a NewCommentJob: # ActionCable.server.broadcast \ # "web_notifications_1", { title: "New things!", body: "All that's fit for print" } # - # # Client-side CoffeeScript, which assumes you've already requested the right to send web notifications + # # Client-side CoffeeScript, which assumes you've already requested the right to send web notifications: # App.cable.subscriptions.create "WebNotificationsChannel", # received: (data) -> # new Notification data['title'], body: data['body'] module Broadcasting - # Broadcast a hash directly to a named <tt>broadcasting</tt>. It'll automatically be JSON encoded. + # Broadcast a hash directly to a named <tt>broadcasting</tt>. This will later be JSON encoded. def broadcast(broadcasting, message) broadcaster_for(broadcasting).broadcast(message) end |