method
associated_records_by_owner
v4.0.2 -
Show latest stable
- Class:
ActiveRecord::Associations::Preloader::ThroughAssociation
associated_records_by_owner()public
No documentation available.
# File activerecord/lib/active_record/associations/preloader/through_association.rb, line 14
def associated_records_by_owner
through_records = through_records_by_owner
Preloader.new(through_records.values.flatten, source_reflection.name, reflection_scope).run
through_records.each do |owner, records|
records.map! { |r| r.send(source_reflection.name) }.flatten!
records.compact!
end
end