Method: Mongoid::Contextual::Mongo#distinct
- Defined in:
- lib/mongoid/contextual/mongo.rb
#distinct(field) ⇒ Array<Object>
Get the distinct values in the db for the provided field.
104 105 106 |
# File 'lib/mongoid/contextual/mongo.rb', line 104 def distinct(field) view.distinct(klass.database_field_name(field)) end |