From 0eaa9272baa1f013fd6f9805a2d1de63a47da344 Mon Sep 17 00:00:00 2001 From: Vladimir Dementyev Date: Mon, 1 Apr 2024 20:02:28 -0700 Subject: [PATCH] docs: add link to 1.5 demo --- docs/extensions.md | 4 ++++ docs/getting_started.md | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/extensions.md b/docs/extensions.md index ad95454..5f0986a 100644 --- a/docs/extensions.md +++ b/docs/extensions.md @@ -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 @@ -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 diff --git a/docs/getting_started.md b/docs/getting_started.md index 27dd051..e95926e 100644 --- a/docs/getting_started.md +++ b/docs/getting_started.md @@ -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)