1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #42060 from Tonkpils/tonkpils/fix-enlist-fixture-connections

Ensure variables are set in case enlist_fixture_connections is called
This commit is contained in:
Eileen M. Uchitelle 2021-04-26 09:35:25 -04:00 committed by GitHub
commit ba1ec19013
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -111,12 +111,11 @@ module ActiveRecord
@fixture_connections = []
@@already_loaded_fixtures ||= {}
@connection_subscriber = nil
@legacy_saved_pool_configs = Hash.new { |hash, key| hash[key] = {} }
@saved_pool_configs = Hash.new { |hash, key| hash[key] = {} }
# Load fixtures once and begin transaction.
if run_in_transaction?
@legacy_saved_pool_configs = Hash.new { |hash, key| hash[key] = {} }
@saved_pool_configs = Hash.new { |hash, key| hash[key] = {} }
if @@already_loaded_fixtures[self.class]
@loaded_fixtures = @@already_loaded_fixtures[self.class]
else