method

associated_records_by_owner

Importance_0
v4.0.2 - Show latest stable - 0 notes - Class: ThroughAssociation
associated_records_by_owner() public

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# 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
Register or log in to add new notes.