method
uniq
uniq(collection = self)
public
Hide source
# File activerecord/lib/active_record/associations/association_collection.rb, line 296 def uniq(collection = self) seen = Set.new collection.inject([]) do |kept, record| unless seen.include?(record.id) kept << record seen << record.id end kept end end