From b4c33711c52dc78e6ff63469a5caa89f9a67c61a Mon Sep 17 00:00:00 2001 From: Rhett Sutphin Date: Wed, 30 Apr 2008 16:59:22 -0500 Subject: Fixed fixture caching with prefixed or suffixed tables. Signed-off-by: Joshua Peek --- activerecord/lib/active_record/fixtures.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/fixtures.rb b/activerecord/lib/active_record/fixtures.rb index f5b2e73da9..7d5fd35dae 100755 --- a/activerecord/lib/active_record/fixtures.rb +++ b/activerecord/lib/active_record/fixtures.rb @@ -469,8 +469,8 @@ class Fixtures < (RUBY_VERSION < '1.9' ? YAML::Omap : Hash) fixtures.size > 1 ? fixtures : fixtures.first end - def self.cache_fixtures(connection, fixtures) - cache_for_connection(connection).update(fixtures.index_by { |f| f.table_name }) + def self.cache_fixtures(connection, fixtures_map) + cache_for_connection(connection).update(fixtures_map) end def self.instantiate_fixtures(object, table_name, fixtures, load_instances = true) @@ -526,7 +526,7 @@ class Fixtures < (RUBY_VERSION < '1.9' ? YAML::Omap : Hash) end end - cache_fixtures(connection, fixtures) + cache_fixtures(connection, fixtures_map) end end end -- cgit v1.2.3