Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix nil error when no databases are defined.

  • Loading branch information...
commit c6d806e6fd1389c124bb19b5c8f0bcbdbac09fc8 1 parent ebbb8e9
Alexander Staubo authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/multidb/configuration.rb
View
1  lib/multidb/configuration.rb
@@ -5,6 +5,7 @@ class << self
def configure!
activerecord_config = ActiveRecord::Base.connection_pool.connection.instance_variable_get(:@config).dup.with_indifferent_access
default_adapter, configuration_hash = activerecord_config, activerecord_config.delete(:multidb)
+ configuration_hash ||= {}
@configuration = Configuration.new(default_adapter, configuration_hash)
end
Please sign in to comment.
Something went wrong with that request. Please try again.