diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-21 19:41:15 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-21 19:41:15 -0700 |
commit | 9b81ae69692300721ea89177d230f8eaa4ea9556 (patch) | |
tree | 9b77c16b339d3430112096a38ed9f7a17e428046 | |
parent | 8d6a6b250ecd3490e5b25654f1263ae4f371d16b (diff) | |
download | rails-9b81ae69692300721ea89177d230f8eaa4ea9556.tar.gz rails-9b81ae69692300721ea89177d230f8eaa4ea9556.tar.bz2 rails-9b81ae69692300721ea89177d230f8eaa4ea9556.zip |
deleting more code
-rw-r--r-- | activerecord/lib/active_record/association_preload.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/association_preload.rb b/activerecord/lib/active_record/association_preload.rb index ab7515ab5a..f1aa87ef1f 100644 --- a/activerecord/lib/active_record/association_preload.rb +++ b/activerecord/lib/active_record/association_preload.rb @@ -317,10 +317,7 @@ module ActiveRecord id_map = {} records.each do |record| key = record.send(primary_key_name) - if key - mapped_records = (id_map[key.to_s] ||= []) - mapped_records << record - end + (id_map[key.to_s] ||= []) << record if key end klasses_and_ids = [[reflection.klass.name, id_map]] end |