aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2010-11-18 10:48:58 -0300
committerEmilio Tagua <miloops@gmail.com>2010-11-19 19:08:59 -0300
commit22696b5b7cb73bd16d03faff61016416d7bb8867 (patch)
tree772793043894000684094fa6fb48cc087bd87484 /activerecord
parentdd166fab33ef496408565a888e587ec6bab2b02f (diff)
downloadrails-22696b5b7cb73bd16d03faff61016416d7bb8867.tar.gz
rails-22696b5b7cb73bd16d03faff61016416d7bb8867.tar.bz2
rails-22696b5b7cb73bd16d03faff61016416d7bb8867.zip
No need to check returned object now that weakhash is gone.
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)