From 910572fffe0b37c1d4c73fa26b849af18eab1d51 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 16 Dec 2015 18:16:55 +0100 Subject: Another stab at only mounting redis if the config is there --- actioncable/lib/action_cable/engine.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actioncable') 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) } -- cgit v1.2.3