aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/identity_map.rb6
1 files changed, 1 insertions, 5 deletions
diff --git a/activerecord/lib/active_record/identity_map.rb b/activerecord/lib/active_record/identity_map.rb
index 10d9b59864..5ebe98c5b2 100644
--- a/activerecord/lib/active_record/identity_map.rb
+++ b/activerecord/lib/active_record/identity_map.rb
@@ -42,11 +42,7 @@ module ActiveRecord
end
def get(klass, primary_key)
- if obj = repository[klass.symbolized_base_class][primary_key]
- return obj if obj.id == primary_key && klass == obj.class
- end
-
- nil
+ repository[klass.symbolized_base_class][primary_key]
end
def add(record)