File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
actioncable/lib/action_cable/server Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,12 @@ module Server
21
21
# ActionCable.server.broadcast \
22
22
# "web_notifications_1", { title: "New things!", body: "All that's fit for print" }
23
23
#
24
- # # Client-side CoffeeScript, which assumes you've already requested the right to send web notifications:
25
- # App.cable.subscriptions.create "WebNotificationsChannel",
26
- # received: (data) ->
27
- # new Notification data['title'], body: data['body']
24
+ # # Client-side JavaScript, which assumes you've already requested the right to send web notifications:
25
+ # App.cable.subscriptions.create("WebNotificationsChannel", {
26
+ # received: function(data) {
27
+ # new Notification(data['title'], { body: data['body'] })
28
+ # }
29
+ # })
28
30
module Broadcasting
29
31
# Broadcast a hash directly to a named `broadcasting`. This will later be JSON
30
32
# encoded.
You can’t perform that action at this time.
0 commit comments