Method: MongoMapper::Document::ClassMethods#all

Defined in:
lib/mongo_mapper/document.rb

#all(options = {}) ⇒ Array

Returns all documents in your collection that match the provided conditions.

Parameters:

  • options (Hash) (defaults to: {})

    any conditions understood by FinderOptions.to_mongo_criteria

Returns:

  • (Array)

    all documents in your collection that match the provided conditions

See Also:



127
128
129
# File 'lib/mongo_mapper/document.rb', line 127

def all(options={})
  find_every(options)
end