lib/octopus/proxy.rb in ar-octopus-0.8.3 vs lib/octopus/proxy.rb in ar-octopus-0.8.4

- old
+ new

@@ -82,11 +82,11 @@ @fully_replicated = config['fully_replicated'] else @fully_replicated = true end - @slaves_list = @shards.keys.map { |sym| sym.to_s }.sort + @slaves_list = @shards.keys.map(&:to_s).sort @slaves_list.delete('master') @slaves_load_balancer = Octopus::LoadBalancing::RoundRobin.new(@slaves_list) end def current_model @@ -342,17 +342,17 @@ end def resolve_string_connection(spec) if Octopus.rails41? resolver = ActiveRecord::ConnectionAdapters::ConnectionSpecification::Resolver.new({}) - resolver.spec(spec).config.stringify_keys + HashWithIndifferentAccess.new(resolver.spec(spec).config) else if Octopus.rails4? resolver = ActiveRecord::ConnectionAdapters::ConnectionSpecification::Resolver.new(spec, {}) else resolver = ActiveRecord::Base::ConnectionSpecification::Resolver.new(spec, {}) end - resolver.spec.config.stringify_keys + HashWithIndifferentAccess.new(resolver.spec.config) end end def should_clean_connection_proxy?(method) method.to_s =~ /insert|select|execute/ && !@replicated && !block