diff options
author | Jon Leighton <j@jonathanleighton.com> | 2012-07-20 19:00:38 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2012-07-20 19:00:46 +0100 |
commit | ac48b62b27630985baec8ad0aae0d331c854a818 (patch) | |
tree | 002dcd1ac0a32d1ea819fd240370ac866296f5b6 /activerecord | |
parent | 3803fcce26b837c0117f7d278b83c366dc4ed370 (diff) | |
download | rails-ac48b62b27630985baec8ad0aae0d331c854a818.tar.gz rails-ac48b62b27630985baec8ad0aae0d331c854a818.tar.bz2 rails-ac48b62b27630985baec8ad0aae0d331c854a818.zip |
we don't need this arg
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/associations/collection_association.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/collection_association.rb b/activerecord/lib/active_record/associations/collection_association.rb index 5c745a27bc..30522e3a5d 100644 --- a/activerecord/lib/active_record/associations/collection_association.rb +++ b/activerecord/lib/active_record/associations/collection_association.rb @@ -285,9 +285,9 @@ module ActiveRecord end end - def uniq(collection = load_target) + def uniq seen = {} - collection.find_all do |record| + load_target.find_all do |record| seen[record.id] = true unless seen.key?(record.id) end end |