diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-11-06 17:07:56 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-06 17:07:56 -0500 |
commit | a705cd8d88ca68b2746db32e70aa1b006e3cd402 (patch) | |
tree | 3511f9531f4f0b347756c79191f7281464d0c9d7 /activerecord/lib/active_record/associations/preloader/has_many_through.rb | |
parent | 204b22fa1c739e07d8487ace5710f8f2abe27c0e (diff) | |
parent | edcc0a714d911468caf7db0879fc7a3d1185ee3c (diff) | |
download | rails-a705cd8d88ca68b2746db32e70aa1b006e3cd402.tar.gz rails-a705cd8d88ca68b2746db32e70aa1b006e3cd402.tar.bz2 rails-a705cd8d88ca68b2746db32e70aa1b006e3cd402.zip |
Merge pull request #22115 from bogdan/refactor-preloader
Refactored preloading of a though assocations
Diffstat (limited to 'activerecord/lib/active_record/associations/preloader/has_many_through.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/preloader/has_many_through.rb | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/activerecord/lib/active_record/associations/preloader/has_many_through.rb b/activerecord/lib/active_record/associations/preloader/has_many_through.rb index 0639fdca44..3e17d07a33 100644 --- a/activerecord/lib/active_record/associations/preloader/has_many_through.rb +++ b/activerecord/lib/active_record/associations/preloader/has_many_through.rb @@ -5,16 +5,6 @@ module ActiveRecord 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(&:uniq!) - end - - records_by_owner - end end end end |