diff options
Diffstat (limited to 'activerecord')
-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 |