Class: Mongoid::Commands::Delete

Inherits:
Object
  • Object
show all
Defined in:
lib/mongoid/commands/delete.rb

Class Method Summary collapse

Class Method Details

.execute(doc) ⇒ Object

Performs a delete of the supplied Document without any callbacks.

Options:

doc: A new Document that is going to be deleted.



10
11
12
# File 'lib/mongoid/commands/delete.rb', line 10

def self.execute(doc)
  doc.collection.remove(:_id => doc.id)
end