aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib
diff options
context:
space:
mode:
authorRhett Sutphin <rhett@detailedbalance.net>2008-04-30 16:59:22 -0500
committerJoshua Peek <josh@joshpeek.com>2008-04-30 16:59:22 -0500
commitb4c33711c52dc78e6ff63469a5caa89f9a67c61a (patch)
treecc28996175324640f38008d469d69c94a5e74030 /activerecord/lib
parentc353794dff580c8aa63b357b2857c1fadff3104b (diff)
downloadrails-b4c33711c52dc78e6ff63469a5caa89f9a67c61a.tar.gz
rails-b4c33711c52dc78e6ff63469a5caa89f9a67c61a.tar.bz2
rails-b4c33711c52dc78e6ff63469a5caa89f9a67c61a.zip
Fixed fixture caching with prefixed or suffixed tables.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'activerecord/lib')
-rwxr-xr-xactiverecord/lib/active_record/fixtures.rb6
1 files changed, 3 insertions, 3 deletions
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