method
associated_records_by_owner
v3.2.8 -
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
ActiveRecord::Associations::Preloader.new(
through_records.values.flatten,
source_reflection.name, options
).run
through_records.each do |owner, records|
records.map! { |r| r.send(source_reflection.name) }.flatten!
records.compact!
end
end