aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2011-01-18 15:21:14 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2011-01-18 15:52:57 -0800
commitf3a5995bbf7a46f5b94e830f97908a3a9314d46e (patch)
treee1936b80daeaa96c1f1ced09e358509a45ef579f /activerecord
parent9e42f1b416771ba91455de711ae680b55640377e (diff)
downloadrails-f3a5995bbf7a46f5b94e830f97908a3a9314d46e.tar.gz
rails-f3a5995bbf7a46f5b94e830f97908a3a9314d46e.tar.bz2
rails-f3a5995bbf7a46f5b94e830f97908a3a9314d46e.zip
keys will always be strings in the id => record map
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/association_preload.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/association_preload.rb b/activerecord/lib/active_record/association_preload.rb
index 74e957f828..3fb3642125 100644
--- a/activerecord/lib/active_record/association_preload.rb
+++ b/activerecord/lib/active_record/association_preload.rb
@@ -165,7 +165,7 @@ module ActiveRecord
end
id_to_record_map.each do |id, records|
- next if seen_keys.include?(id.to_s)
+ next if seen_keys.include?(id)
records.each do |record|
record.send(:association_proxy, reflection_name).target = nil
end