Flowdock
method

through_records_by_owner

Importance_0
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: ThroughAssociation

Method not available on this version

This method is only available on newer versions. The first available version of the method is shown here.

through_records_by_owner() private

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 30
        def through_records_by_owner
          ActiveRecord::Associations::Preloader.new(
            owners, through_reflection.name,
            through_options
          ).run

          Hash[owners.map do |owner|
            through_records = Array.wrap(owner.send(through_reflection.name))

            # Dont cache the association - we would only be caching a subset
            if reflection.options[:source_type] && through_reflection.collection?
              owner.association(through_reflection.name).reset
            end

            [owner, through_records]
          end]
        end
Register or log in to add new notes.