aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/identity_map.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2011-05-06 14:07:24 -0700
committerJosé Valim <jose.valim@gmail.com>2011-05-06 14:07:24 -0700
commitb8f08c4ea7c56e34e3e17c9006f1ae6d9f7504ee (patch)
treea94c0709c3cab24930e379840f5e9b55af5268be /activerecord/lib/active_record/identity_map.rb
parentfd9df1b1dd1196c2233835e25a6a38956e9e3959 (diff)
parentfc2823a85c8c5e4c0415fbb6b9e7d01f020b3036 (diff)
downloadrails-b8f08c4ea7c56e34e3e17c9006f1ae6d9f7504ee.tar.gz
rails-b8f08c4ea7c56e34e3e17c9006f1ae6d9f7504ee.tar.bz2
rails-b8f08c4ea7c56e34e3e17c9006f1ae6d9f7504ee.zip
Merge pull request #423 from richardiux/master
Identity Map caching bug
Diffstat (limited to 'activerecord/lib/active_record/identity_map.rb')
-rw-r--r--activerecord/lib/active_record/identity_map.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/identity_map.rb b/activerecord/lib/active_record/identity_map.rb
index 9eb47ad99f..f88ead9ca0 100644
--- a/activerecord/lib/active_record/identity_map.rb
+++ b/activerecord/lib/active_record/identity_map.rb
@@ -49,7 +49,7 @@ module ActiveRecord
end
def get(klass, primary_key)
- record = repository[klass.symbolized_base_class][primary_key]
+ record = repository[klass.symbolized_sti_name][primary_key]
if record.is_a?(klass)
ActiveSupport::Notifications.instrument("identity.active_record",
@@ -64,15 +64,15 @@ module ActiveRecord
end
def add(record)
- repository[record.class.symbolized_base_class][record.id] = record
+ repository[record.class.symbolized_sti_name][record.id] = record
end
def remove(record)
- repository[record.class.symbolized_base_class].delete(record.id)
+ repository[record.class.symbolized_sti_name].delete(record.id)
end
- def remove_by_id(symbolized_base_class, id)
- repository[symbolized_base_class].delete(id)
+ def remove_by_id(symbolized_sti_name, id)
+ repository[symbolized_sti_name].delete(id)
end
def clear