From dfd7c2f05828d567d9803ca8aed51eac71092160 Mon Sep 17 00:00:00 2001 From: Eric Zhang Date: Fri, 12 Aug 2016 00:23:14 +0800 Subject: [ci skip] Fix documentation for ActionCable::Channel#broadcast_to --- guides/source/action_cable_overview.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guides') diff --git a/guides/source/action_cable_overview.md b/guides/source/action_cable_overview.md index 02db86888c..3501822bed 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 -- cgit v1.2.3 From 3f9d3809634c50621dbab6346b4ee5bbe53c15b6 Mon Sep 17 00:00:00 2001 From: Eric Zhang Date: Fri, 12 Aug 2016 00:29:20 +0800 Subject: [ci skip] Fix documentation wrong for ActionCable --- guides/source/action_cable_overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides') diff --git a/guides/source/action_cable_overview.md b/guides/source/action_cable_overview.md index 3501822bed..118b0b52b2 100644 --- a/guides/source/action_cable_overview.md +++ b/guides/source/action_cable_overview.md @@ -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.' -- cgit v1.2.3