From 3939b9ec7d2bd4ee3f521878a8f013ba350709b5 Mon Sep 17 00:00:00 2001 From: Neil Lalonde Date: Fri, 12 Feb 2016 17:20:38 -0500 Subject: [PATCH] FIX: restore in development mode connects to the wrong database --- lib/backup_restore/backup_restore.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/backup_restore/backup_restore.rb b/lib/backup_restore/backup_restore.rb index e0f02ecb1b3..cde7cfefd4d 100644 --- a/lib/backup_restore/backup_restore.rb +++ b/lib/backup_restore/backup_restore.rb @@ -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(