diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2015-12-16 18:16:55 +0100 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2015-12-16 18:17:12 +0100 |
commit | 910572fffe0b37c1d4c73fa26b849af18eab1d51 (patch) | |
tree | a7355aad920c6618dd71f6d7bfe52594960ad290 /actioncable | |
parent | 7eb12796cabb1d6784daf261ca8e344513cacede (diff) | |
download | rails-910572fffe0b37c1d4c73fa26b849af18eab1d51.tar.gz rails-910572fffe0b37c1d4c73fa26b849af18eab1d51.tar.bz2 rails-910572fffe0b37c1d4c73fa26b849af18eab1d51.zip |
Another stab at only mounting redis if the config is there
Diffstat (limited to 'actioncable')
-rw-r--r-- | actioncable/lib/action_cable/engine.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actioncable/lib/action_cable/engine.rb b/actioncable/lib/action_cable/engine.rb index 9bb7ef5aff..2d3caa5b0a 100644 --- a/actioncable/lib/action_cable/engine.rb +++ b/actioncable/lib/action_cable/engine.rb @@ -27,8 +27,8 @@ module ActionCable app.paths.add "config/redis/cable", with: "config/redis/cable.yml" ActiveSupport.on_load(:action_cable) do - if redis_cable_path = app.config.paths["config/redis/cable"].existent - self.redis = Rails.application.config_for(Pathname.new(redis_cable_path.first)).with_indifferent_access + if (redis_cable_path = Pathname.new(app.config.paths["config/redis/cable"].first)).exist? + self.redis = Rails.application.config_for(redis_cable_path).with_indifferent_access end options.each { |k,v| send("#{k}=", v) } |