File tree 4 files changed +5
-5
lines changed
4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -178,7 +178,7 @@ App.cable.subscriptions.create "AppearanceChannel",
178
178
```
179
179
180
180
Simply calling ` App.cable.subscriptions.create ` will setup the subscription, which will call ` AppearanceChannel#subscribed ` ,
181
- which in turn is linked to original ` App.cable ` -> ` ApplicationCable::Connection ` instances.
181
+ which in turn is linked to the original ` App.cable ` -> ` ApplicationCable::Connection ` instances.
182
182
183
183
Next, we link the client-side ` appear ` method to ` AppearanceChannel#appear(data) ` . This is possible because the server-side
184
184
channel instance will automatically expose the public methods declared on the class (minus the callbacks), so that these
Original file line number Diff line number Diff line change @@ -12,8 +12,8 @@ module PeriodicTimers
12
12
end
13
13
14
14
module ClassMethods
15
- # Allows you to call a private method <tt>every</tt> so often seconds. This periodic timer can be useful
16
- # for sending a steady flow of updates to a client based off an object that was configured on subscription.
15
+ # Allows you to call a private method periodically. Specify the period, in seconds, using the <tt>every</tt> keyword argument.
16
+ # This periodic timer can be useful for sending a steady flow of updates to a client based off an object that was configured on subscription.
17
17
# It's an alternative to using streams if the channel is able to do the work internally.
18
18
def periodically ( callback , every :)
19
19
self . periodic_timers += [ [ callback , every : every ] ]
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ module ActionCable
2
2
module Channel
3
3
# Streams allow channels to route broadcastings to the subscriber. A broadcasting is, as discussed elsewhere, a pubsub queue where any data
4
4
# placed into it is automatically sent to the clients that are connected at that time. It's purely an online queue, though. If you're not
5
- # streaming a broadcasting at the very moment it sends out an update, you will not get that update, if you connect after it has been sent.
5
+ # streaming a broadcasting at the very moment it sends out an update, you will not get that update, even if you connect after it has been sent.
6
6
#
7
7
# Most commonly, the streamed broadcast is sent straight to the subscriber on the client-side. The channel just acts as a connector between
8
8
# the two parties (the broadcaster and the channel subscriber). Here's an example of a channel that allows subscribers to get all new
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ module Connection
40
40
# Second, we rely on the fact that the WebSocket connection is established with the cookies from the domain being sent along. This makes
41
41
# it easy to use signed cookies that were set when logging in via a web interface to authorize the WebSocket connection.
42
42
#
43
- # Finally, we add a tag to the connection-specific logger with name of the current user to easily distinguish their messages in the log.
43
+ # Finally, we add a tag to the connection-specific logger with the name of the current user to easily distinguish their messages in the log.
44
44
#
45
45
# Pretty simple, eh?
46
46
class Base
You can’t perform that action at this time.
0 commit comments