Skip to content

Commit

Permalink
docs: add link to 1.5 demo
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan committed Apr 2, 2024
1 parent 85ec06e commit 0eaa927
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions docs/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ AnyCable comes with useful Action Cable API extensions which you may use with an

### Broadcast to objects

> See the [demo](https://github.com/anycable/anycable_rails_demo/pull/34) of using this feature.
AnyCable allows to pass not only strings but arbitrary to `ActionCable.server.broadcast` to represent streams, for example:

```ruby
Expand Down Expand Up @@ -68,6 +70,8 @@ This feature is only supported when using AnyCable.

## Whispering

> See the [demo](https://github.com/anycable/anycable_rails_demo/pull/34) of using whispering with Rails.
AnyCable supports _whispering_, or client-initiated broadcasts. A typical use-case for whispering is sending typing notifications in messaging apps or sharing cursor positions. Here is an example client-side code leveraging whispers (using [AnyCable JS][anycable-client]):

```js
Expand Down
4 changes: 2 additions & 2 deletions docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ To use `:test` Action Cable adapter along with AnyCable, you can extend it in th
# config/environments/test.rb
Rails.application.configure do
config.after_initialize do
# Don't forget to configure URL
config.action_cable.url = ActionCable.server.config.url = ENV.fetch("CABLE_URL", "ws://localhost:8080/cable")
# Don't forget to configure URL in your anycable.yml or via ANYCABLE_WEBSOCKET_URL
config.action_cable.url = ActionCable.server.config.url = AnyCable.config.websocket_url
# Make test adapter AnyCable-compatible
AnyCable::Rails.extend_adapter!(ActionCable.server.pubsub)
Expand Down

0 comments on commit 0eaa927

Please sign in to comment.