Class: Humanoid::Commands::Destroy
- Extended by:
- Deletion
- Defined in:
- lib/humanoid/commands/destroy.rb
Class Method Summary collapse
-
.execute(doc) ⇒ Object
Performs a destroy of the supplied
Document
, with the necessary callbacks.
Methods included from Deletion
Class Method Details
.execute(doc) ⇒ Object
Performs a destroy of the supplied Document
, with the necessary callbacks. It then deletes the record from the collection.
Options:
doc: A new Document
that is going to be destroyed.
12 13 14 15 16 |
# File 'lib/humanoid/commands/destroy.rb', line 12 def self.execute(doc) doc.run_callbacks :before_destroy delete(doc) doc.run_callbacks :after_destroy end |