diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-05 11:13:12 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2019-04-05 11:13:12 +0900 |
commit | a11ca2ff76d3e1b845282e784c3970b2ebaffd89 (patch) | |
tree | 10f0a8fd2642831975326efef9a1009e4997852f /activerecord/lib/active_record | |
parent | bbd8dd9ccaea20d03b95ae2946225ab5080023b4 (diff) | |
download | rails-a11ca2ff76d3e1b845282e784c3970b2ebaffd89.tar.gz rails-a11ca2ff76d3e1b845282e784c3970b2ebaffd89.tar.bz2 rails-a11ca2ff76d3e1b845282e784c3970b2ebaffd89.zip |
`preloaded_records` no longer includes `nil` since #35496
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/associations/preloader.rb | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/preloader.rb b/activerecord/lib/active_record/associations/preloader.rb index c7cd87f9d4..6b57e5093a 100644 --- a/activerecord/lib/active_record/associations/preloader.rb +++ b/activerecord/lib/active_record/associations/preloader.rb @@ -150,7 +150,6 @@ module ActiveRecord def grouped_records(association, records, polymorphic_parent) h = {} records.each do |record| - next unless record reflection = record.class._reflect_on_association(association) next if polymorphic_parent && !reflection || !record.association(association).klass (h[reflection] ||= []) << record |