Method: MongoDoc::Contexts::Mongo#distinct

Defined in:
lib/mongo_doc/contexts/mongo.rb

#distinct(field) ⇒ Object

Gets an array of distinct values for the supplied field across the entire collection or the susbset given the criteria.

Example:

context.distinct(:title)



67
68
69
# File 'lib/mongo_doc/contexts/mongo.rb', line 67

def distinct(field)
  collection.distinct(field, selector)
end