mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
preloaded_records
no longer includes nil
since #35496
This commit is contained in:
parent
bbd8dd9cca
commit
a11ca2ff76
1 changed files with 0 additions and 1 deletions
|
@ -150,7 +150,6 @@ module ActiveRecord
|
||||||
def grouped_records(association, records, polymorphic_parent)
|
def grouped_records(association, records, polymorphic_parent)
|
||||||
h = {}
|
h = {}
|
||||||
records.each do |record|
|
records.each do |record|
|
||||||
next unless record
|
|
||||||
reflection = record.class._reflect_on_association(association)
|
reflection = record.class._reflect_on_association(association)
|
||||||
next if polymorphic_parent && !reflection || !record.association(association).klass
|
next if polymorphic_parent && !reflection || !record.association(association).klass
|
||||||
(h[reflection] ||= []) << record
|
(h[reflection] ||= []) << record
|
||||||
|
|
Loading…
Reference in a new issue