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.11.3 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.2.11.2 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.2.11.1 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.2.11 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.2.10 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.2.10.rc1 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.2.9 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.2.9.rc2 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.2.9.rc1 lib/active_record/associations/preloader/has_many_through.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/activerecord-4.2.8/lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.2.8 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.2.8.rc1 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.2.7.1 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.2.7 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.1.16 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.1.16.rc1 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.2.7.rc1 lib/active_record/associations/preloader/has_many_through.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-4.2.6/lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.1.15 lib/active_record/associations/preloader/has_many_through.rb
activerecord-4.2.6 lib/active_record/associations/preloader/has_many_through.rb