From a4f96c331100310c6c42291ff926911d47a38c9a Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Wed, 8 Apr 2015 19:30:06 -0500 Subject: Redis config with indifferent access --- lib/action_cable/server.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/action_cable') diff --git a/lib/action_cable/server.rb b/lib/action_cable/server.rb index 75039b8d5e..507b154e0d 100644 --- a/lib/action_cable/server.rb +++ b/lib/action_cable/server.rb @@ -5,7 +5,7 @@ module ActionCable attr_accessor :registered_channels, :redis_config def initialize(redis_config:, channels:, worker_pool_size: 100, connection: Connection) - @redis_config = redis_config + @redis_config = redis_config.with_indifferent_access @registered_channels = Set.new(channels) @worker_pool_size = worker_pool_size @connection_class = connection @@ -22,7 +22,7 @@ module ActionCable end def pubsub - @pubsub ||= EM::Hiredis.connect(@redis_config['url']).pubsub + @pubsub ||= EM::Hiredis.connect(@redis_config[:url]).pubsub end def remote_connections -- cgit v1.2.3