aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2012-07-20 19:00:38 +0100
committerJon Leighton <j@jonathanleighton.com>2012-07-20 19:00:46 +0100
commitac48b62b27630985baec8ad0aae0d331c854a818 (patch)
tree002dcd1ac0a32d1ea819fd240370ac866296f5b6 /activerecord
parent3803fcce26b837c0117f7d278b83c366dc4ed370 (diff)
downloadrails-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.rb4
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