diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2015-12-16 15:31:25 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2015-12-16 15:31:25 +0100 |
commit | deac98875612167ca207c6bff26427717ad32436 (patch) | |
tree | dd1b2b74763fd6e18f1de59ab04abfddbb502d90 /actioncable | |
parent | 26bcf81a01bfe12e9f2ef06e4ea84e9e5fa02f9c (diff) | |
download | rails-deac98875612167ca207c6bff26427717ad32436.tar.gz rails-deac98875612167ca207c6bff26427717ad32436.tar.bz2 rails-deac98875612167ca207c6bff26427717ad32436.zip |
Include changes made to the engine
Diffstat (limited to 'actioncable')
-rw-r--r-- | actioncable/lib/action_cable/railtie.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/actioncable/lib/action_cable/railtie.rb b/actioncable/lib/action_cable/railtie.rb index d4833eb9e3..1faecb19d7 100644 --- a/actioncable/lib/action_cable/railtie.rb +++ b/actioncable/lib/action_cable/railtie.rb @@ -19,11 +19,16 @@ module ActionCable end initializer "action_cable.set_configs" do |app| + app.paths.add "config/redis/cable", with: "config/redis/cable.yml" + options = app.config.action_cable options.allowed_request_origins ||= "http://localhost:3000" if ::Rails.env.development? ActiveSupport.on_load(:action_cable) do + path = Pathname.new(paths["config/redis/cable"].existent.first) + self.redis = Rails.application.config_for(redis_path).with_indifferent_access + options.each { |k,v| send("#{k}=", v) } end end |