FIX: restore in development mode connects to the wrong database

This commit is contained in:
Neil Lalonde 2016-02-12 17:20:38 -05:00
parent 06c9e79984
commit 3939b9ec7d

View file

@ -100,7 +100,7 @@ module BackupRestore
DatabaseConfiguration = Struct.new(:host, :port, :username, :password, :database)
def self.database_configuration
config = Rails.env.production? ? ActiveRecord::Base.connection_pool.spec.config : Rails.configuration.database_configuration[Rails.env]
config = ActiveRecord::Base.connection_pool.spec.config
config = config.with_indifferent_access
DatabaseConfiguration.new(