Permalink
Browse files

Fix default connection.

  • Loading branch information...
1 parent 4ac4e2a commit 7a2c06eae333fde68382c31b496fa4edd8ef1667 Alexander Staubo committed May 18, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/multidb/balancer.rb
View
2 lib/multidb/balancer.rb
@@ -20,7 +20,6 @@ def connection
class Balancer
def initialize(configuration)
- @default_candidate = Candidate.new(@configuration.default_adapter)
@candidates = {}.with_indifferent_access
@configuration = configuration
@configuration.raw_configuration[:databases].each_pair do |name, config|
@@ -31,6 +30,7 @@ def initialize(configuration)
@candidates[name].push(candidate)
end
end
+ @default_candidate = Candidate.new(@configuration.default_adapter)
unless @candidates.include?(:default)
@candidates[:default] = [@default_candidate]
end

0 comments on commit 7a2c06e

Please sign in to comment.