Sha256: 7f3de2099deb85a03289603df695232631b2a72b9dae2524d9116548688d90e8

Contents?: true

Size: 440 Bytes

Versions: 95

Compression:

Stored size: 440 Bytes

Contents

module ActiveRecord
  module Associations
    class Preloader
      class HasManyThrough < CollectionAssociation #:nodoc:
        include ThroughAssociation

        def associated_records_by_owner(preloader)
          records_by_owner = super

          if reflection_scope.distinct_value
            records_by_owner.each_value { |records| records.uniq! }
          end

          records_by_owner
        end
      end
    end
  end
end

Version data entries

95 entries across 91 versions & 8 rubygems

Version Path
activerecord-4.2.4 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.1.13 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.2.4.rc1 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.1.13.rc1 lib/active_record/associations/preloader/has_many_through.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/activerecord-4.2.3/lib/active_record/associations/preloader/has_many_through.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/activerecord-4.2.3/lib/active_record/associations/preloader/has_many_through.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/activerecord-4.2.2/lib/active_record/associations/preloader/has_many_through.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/activerecord-4.2.1/lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.2.3 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.1.12 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.2.3.rc1 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.1.12.rc1 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.2.2 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.1.11 lib/active_record/associations/preloader/has_many_through.rb
shoppe-paypal-1.1.0 vendor/bundle/ruby/2.1.0/gems/activerecord-4.2.1/lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.1.10 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.2.1 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.1.10.rc4 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.2.1.rc4 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.1.10.rc3 lib/active_record/associations/preloader/has_many_through.rb