diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-21 19:37:07 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-21 19:37:07 -0700 |
commit | 8d6a6b250ecd3490e5b25654f1263ae4f371d16b (patch) | |
tree | c41038df5151396f857a1880c9a83b0c862e5b2e /activerecord/lib/active_record | |
parent | 19ff42d909bd11512ffaad12031d7127fa9b5d8c (diff) | |
download | rails-8d6a6b250ecd3490e5b25654f1263ae4f371d16b.tar.gz rails-8d6a6b250ecd3490e5b25654f1263ae4f371d16b.tar.bz2 rails-8d6a6b250ecd3490e5b25654f1263ae4f371d16b.zip |
use each properly to avoid splatting a variable
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/association_preload.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/association_preload.rb b/activerecord/lib/active_record/association_preload.rb index 82d8c77242..ab7515ab5a 100644 --- a/activerecord/lib/active_record/association_preload.rb +++ b/activerecord/lib/active_record/association_preload.rb @@ -325,8 +325,7 @@ module ActiveRecord klasses_and_ids = [[reflection.klass.name, id_map]] end - klasses_and_ids.each do |klass_and_id| - klass_name, id_map = *klass_and_id + klasses_and_ids.each do |klass_name, id_map| next if id_map.empty? klass = klass_name.constantize |