Skip to content

Commit 7165714

Browse files
committed
Merge pull request rails#24600 from tomkadwill/action-cabel-channel-typos
Fix typos in ActionCable Channel [ci skip]
2 parents 2ab7c22 + 2ef18c1 commit 7165714

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

actioncable/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ App.cable.subscriptions.create "AppearanceChannel",
178178
```
179179

180180
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.
182182

183183
Next, we link the client-side `appear` method to `AppearanceChannel#appear(data)`. This is possible because the server-side
184184
channel instance will automatically expose the public methods declared on the class (minus the callbacks), so that these

actioncable/lib/action_cable/channel/periodic_timers.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ module PeriodicTimers
1212
end
1313

1414
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.
1717
# It's an alternative to using streams if the channel is able to do the work internally.
1818
def periodically(callback, every:)
1919
self.periodic_timers += [ [ callback, every: every ] ]

actioncable/lib/action_cable/channel/streams.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module ActionCable
22
module Channel
33
# Streams allow channels to route broadcastings to the subscriber. A broadcasting is, as discussed elsewhere, a pubsub queue where any data
44
# 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.
66
#
77
# Most commonly, the streamed broadcast is sent straight to the subscriber on the client-side. The channel just acts as a connector between
88
# the two parties (the broadcaster and the channel subscriber). Here's an example of a channel that allows subscribers to get all new

actioncable/lib/action_cable/connection/base.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module Connection
4040
# Second, we rely on the fact that the WebSocket connection is established with the cookies from the domain being sent along. This makes
4141
# it easy to use signed cookies that were set when logging in via a web interface to authorize the WebSocket connection.
4242
#
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.
4444
#
4545
# Pretty simple, eh?
4646
class Base

0 commit comments

Comments
 (0)