Flowdock
method

uniq

Importance_1
v3.2.3 - Show latest stable - 0 notes - Class: ActiveRecord::QueryMethods
uniq(value = true) public

Specifies whether the records should be unique or not. For example:

User.select(:name)
# => Might return two records with the same name

User.select(:name).uniq
# => Returns 1 record per unique name

User.select(:name).uniq.uniq(false)
# => You can also remove the uniqueness
Show source
Register or log in to add new notes.