diff options
author | Sean Griffin <sean@seantheprogrammer.com> | 2016-11-17 14:55:19 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-11-17 14:55:19 -0500 |
commit | 07af54d43cba30be7c206c5783ae15ab2cf37aa3 (patch) | |
tree | 920354ffda3eab692e5a9efb333b67f43cca492f /activerecord/lib/active_record/associations/collection_association.rb | |
parent | f48bb1b4ad86bad71ae9c3e5dd3db6b4cb80e4d1 (diff) | |
parent | 0ec967aa6655d62c92f72acb8d556a5b3f70762d (diff) | |
download | rails-07af54d43cba30be7c206c5783ae15ab2cf37aa3.tar.gz rails-07af54d43cba30be7c206c5783ae15ab2cf37aa3.tar.bz2 rails-07af54d43cba30be7c206c5783ae15ab2cf37aa3.zip |
Merge pull request #26980 from kamipo/respect_new_records_for_collection_proxy_distinct
Respect new records for `CollectionProxy#uniq`
Diffstat (limited to 'activerecord/lib/active_record/associations/collection_association.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/collection_association.rb | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index 5a323c62e6..b2cf4713bb 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -246,13 +246,6 @@ module ActiveRecord end end - def distinct - seen = {} - load_target.find_all do |record| - seen[record.id] = true unless seen.key?(record.id) - end - end - # Replace this collection with +other_array+. This will perform a diff # and delete/add only records that have changed. def replace(other_array) |