1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

[ci skip] Fix grammar

This commit is contained in:
Akshay Vishnoi 2015-12-18 13:02:17 +05:30
parent 477bed8871
commit ebad5c72d3
3 changed files with 5 additions and 5 deletions

View file

@ -202,7 +202,7 @@ end
```
```coffeescript
# Client-side which assumes you've already requested the right to send web notifications
# Client-side, 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"]
@ -236,7 +236,7 @@ end
Pass an object as the first argument to `subscriptions.create`, and that object will become your params hash in your cable channel. The keyword `channel` is required.
```coffeescript
# Client-side which assumes you've already requested the right to send web notifications
# Client-side, which assumes you've already requested the right to send web notifications
App.cable.subscriptions.create { channel: "ChatChannel", room: "Best Room" },
received: (data) ->
@appendLine(data)
@ -279,7 +279,7 @@ end
```
```coffeescript
# Client-side which assumes you've already requested the right to send web notifications
# Client-side, which assumes you've already requested the right to send web notifications
App.chatChannel = App.cable.subscriptions.create { channel: "ChatChannel", room: "Best Room" },
received: (data) ->
# data => { sent_by: "Paul", body: "This is a cool chat app." }

View file

@ -42,7 +42,7 @@ module ActionCable
@worker_pool ||= ActionCable::Server::Worker.pool(size: config.worker_pool_size)
end
# Requires and returns an hash of all the channel class constants keyed by name.
# Requires and returns a hash of all the channel class constants keyed by name.
def channel_classes
@channel_classes ||= begin
config.channel_paths.each { |channel_path| require channel_path }

View file

@ -15,7 +15,7 @@ module ActionCable
# ActionCable.server.broadcast \
# "web_notifications_1", { title: 'New things!', body: 'All shit fit for print' }
#
# # Client-side coffescript which assumes you've already requested the right to send web notifications
# # Client-side coffescript, 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']