Sha256: 5ae5bddf8bdf53a97d8afd17b7258f64394adfaa5c19111b9df883a71fec818f

Contents?: true

Size: 429 Bytes

Versions: 29

Compression:

Stored size: 429 Bytes

Contents

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

        def associated_records_by_owner
          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

29 entries across 29 versions & 2 rubygems

Version Path
activerecord-4.0.13 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.0.13.rc1 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.0.11.1 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.0.12 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.0.11 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.0.10 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.0.10.rc2 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.0.10.rc1 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.0.9 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.0.8 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.0.7 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.0.6 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.0.6.rc3 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.0.6.rc2 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.0.6.rc1 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.0.5 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.0.4 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.0.4.rc1 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.0.3 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.0.2 lib/active_record/associations/preloader/has_many_through.rb