aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Moss <maclover7@users.noreply.github.com>2016-08-11 21:47:34 -0400
committerGitHub <noreply@github.com>2016-08-11 21:47:34 -0400
commit5821baebe5cedf710ffa5bd99ff80b2150227676 (patch)
tree677b1cf33f1c91bbf51ec764cc3cf58393fa9592
parent134e431b3be38676f96eb961b3c74477511795a5 (diff)
parent3f9d3809634c50621dbab6346b4ee5bbe53c15b6 (diff)
downloadrails-5821baebe5cedf710ffa5bd99ff80b2150227676.tar.gz
rails-5821baebe5cedf710ffa5bd99ff80b2150227676.tar.bz2
rails-5821baebe5cedf710ffa5bd99ff80b2150227676.zip
Merge pull request #26125 from qinix/fix-doc
[ci skip] Fix the wrong ActionCable documentation in the guide.
-rw-r--r--guides/source/action_cable_overview.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/guides/source/action_cable_overview.md b/guides/source/action_cable_overview.md
index 02db86888c..118b0b52b2 100644
--- a/guides/source/action_cable_overview.md
+++ b/guides/source/action_cable_overview.md
@@ -242,10 +242,10 @@ WebNotificationsChannel.broadcast_to(
The `WebNotificationsChannel.broadcast_to` call places a message in the current
subscription adapter (Redis by default)'s pubsub queue under a separate
broadcasting name for each user. For a user with an ID of 1, the broadcasting
-name would be `web_notifications_1`.
+name would be `web_notifications:1`.
The channel has been instructed to stream everything that arrives at
-`web_notifications_1` directly to the client by invoking the `received`
+`web_notifications:1` directly to the client by invoking the `received`
callback.
### Subscriptions
@@ -313,7 +313,7 @@ App.cable.subscriptions.create { channel: "ChatChannel", room: "Best Room" },
```ruby
# Somewhere in your app this is called, perhaps
# from a NewCommentJob.
-ChatChannel.broadcast_to(
+ActionCable.server.broadcast(
"chat_#{room}",
sent_by: 'Paul',
body: 'This is a cool chat app.'