Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify how broadcastings are named [ci skip] #38082

Merged
merged 1 commit into from
Apr 8, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions guides/source/action_cable_overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,9 @@ consumer.subscriptions.create({ channel: "ChatChannel", room: "2nd Room" })
### Streams

*Streams* provide the mechanism by which channels route published content
(broadcasts) to their subscribers.
(broadcasts) to their subscribers. The following example would
subscribe to the broadcasting `chat_Best Room` if the room parameter
is `Best Room`:

```ruby
# app/channels/chat_channel.rb
Expand All @@ -262,8 +264,9 @@ end
```

If you have a stream that is related to a model, then the broadcasting used
can be generated from the model and channel. The following example would
subscribe to a broadcasting like `comments:Z2lkOi8vVGVzdEFwcC9Qb3N0LzE`
can be generated from the channel and model. The following example would
subscribe to a broadcasting like `comments:Z2lkOi8vVGVzdEFwcC9Qb3N0LzE`,
where `Z2lkOi8vVGVzdEFwcC9Qb3N0LzE` is the GlobalID of the Post model.

```ruby
class CommentsChannel < ApplicationCable::Channel
Expand Down