method

associated_records_by_owner

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