aboutsummaryrefslogtreecommitdiffstats
path: root/actioncable
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2015-12-16 18:16:55 +0100
committerDavid Heinemeier Hansson <david@loudthinking.com>2015-12-16 18:17:12 +0100
commit910572fffe0b37c1d4c73fa26b849af18eab1d51 (patch)
treea7355aad920c6618dd71f6d7bfe52594960ad290 /actioncable
parent7eb12796cabb1d6784daf261ca8e344513cacede (diff)
downloadrails-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.rb4
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) }