aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md6
1 files changed, 3 insertions, 3 deletions
diff --git a/README.md b/README.md
index 50055fba10..c0d91fdba4 100644
--- a/README.md
+++ b/README.md
@@ -173,12 +173,12 @@ class WebNotificationsChannel < ApplicationCable::Channel
```coffeescript
# Somewhere in your app this is called, perhaps from a NewCommentJob
ActionCable.server.broadcast \
- "web_notifications_1", { title: 'New things!', body: 'All shit fit for print' }
+ "web_notifications_1", { title: 'New things!', body: 'All shit fit for print' }
# Client-side which assumes you've already requested the right to send web notifications
App.cable.subscriptions.create "WebNotificationsChannel",
- received: (data) ->
- web_notification = new Notification data['title'], body: data['body']
+ received: (data) ->
+ new Notification data['title'], body: data['body']
```
The `ActionCable.server.broadcast` call places a message in the Redis' pubsub queue under the broadcasting name of `web_notifications_1`.