Class: Mongoid::Persistence::RemoveAll
- Defined in:
- lib/mongoid/persistence/remove_all.rb
Overview
Remove is a persistence command responsible for deleting a document from the database.
The underlying query resembles the following MongoDB query:
collection.remove(
{ "field" : value },
false
);
Instance Attribute Summary
Attributes inherited from Command
#collection, #document, #klass, #options, #selector, #validate
Instance Method Summary collapse
-
#persist ⇒ Object
Remove the document from the database: delegates to the MongoDB collection remove method.
Methods inherited from Command
Constructor Details
This class inherits a constructor from Mongoid::Persistence::Command
Instance Method Details
#persist ⇒ Object
Remove the document from the database: delegates to the MongoDB collection remove method.
Example:
Remove.persist
Returns:
true
if success, false
if not.
24 25 26 |
# File 'lib/mongoid/persistence/remove_all.rb', line 24 def persist remove end |