diff options
author | Vladimir Dementyev <dementiev.vm@gmail.com> | 2018-12-14 16:46:39 -0500 |
---|---|---|
committer | Vladimir Dementyev <dementiev.vm@gmail.com> | 2019-02-12 17:17:46 -0500 |
commit | 3cd69fa2c025da1cc45b1b9b43b227cceb025837 (patch) | |
tree | acd23f3be831673cb04a49ef847aff6876c47c57 /actioncable/CHANGELOG.md | |
parent | 7432e251873690234d0d288e8eb009fbee80b635 (diff) | |
download | rails-3cd69fa2c025da1cc45b1b9b43b227cceb025837.tar.gz rails-3cd69fa2c025da1cc45b1b9b43b227cceb025837.tar.bz2 rails-3cd69fa2c025da1cc45b1b9b43b227cceb025837.zip |
Allow passing custom config to ActionCable::Server::Base
That allows us to create a separate, isolated Action Cable server
instance within the same app.
Diffstat (limited to 'actioncable/CHANGELOG.md')
-rw-r--r-- | actioncable/CHANGELOG.md | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/actioncable/CHANGELOG.md b/actioncable/CHANGELOG.md index 42edbd6954..3ce35edbb8 100644 --- a/actioncable/CHANGELOG.md +++ b/actioncable/CHANGELOG.md @@ -1,3 +1,26 @@ +* Allow passing custom configuration to `ActionCable::Server::Base`. + + You can now create a standalone Action Cable server with a custom configuration + (e.g. to run it in isolation from the default one): + + ```ruby + config = ActionCable::Server::Configuration.new + config.cable = { adapter: "redis", channel_prefix: "custom_" } + + CUSTOM_CABLE = ActionCable::Server::Base.new(config: config) + ``` + + Then you can mount it in the `routes.rb` file: + + ```ruby + Rails.application.routes.draw do + mount CUSTOM_CABLE => "/custom_cable" + # ... + end + ``` + + *Vladimir Dementyev* + * Add `:action_cable_connection` and `:action_cable_channel` load hooks. You can use them to extend `ActionCable::Connection::Base` and `ActionCable::Channel::Base` |