mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
clear cache for all connections when resetting
This commit is contained in:
parent
e0802fa176
commit
61fc309479
1 changed files with 3 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue