diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-02-11 16:26:48 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-02-11 16:26:48 -0800 |
commit | 61fc3094799f82fa4f4c33b5e02656cf6a0126ab (patch) | |
tree | 618385790c1dbcfee06c24ce0c56af47217aad5a /activerecord | |
parent | e0802fa1766ab70d04a2d52f2c79f0ca818d6674 (diff) | |
download | rails-61fc3094799f82fa4f4c33b5e02656cf6a0126ab.tar.gz rails-61fc3094799f82fa4f4c33b5e02656cf6a0126ab.tar.bz2 rails-61fc3094799f82fa4f4c33b5e02656cf6a0126ab.zip |
clear cache for all connections when resetting
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/fixtures.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index 962698b2fd..2cef5570e1 100644 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -456,13 +456,12 @@ class Fixtures table_name.to_s.camelize end - def self.reset_cache(connection = nil) - connection ||= ActiveRecord::Base.connection - @@all_cached_fixtures.delete connection.object_id + def self.reset_cache + @@all_cached_fixtures.clear end def self.cache_for_connection(connection) - @@all_cached_fixtures[connection.object_id] + @@all_cached_fixtures[connection] end def self.fixture_is_cached?(connection, table_name) |