Module: Mongoid::Persistable::Deletable
- Extended by:
- ActiveSupport::Concern
- Included in:
- Mongoid::Persistable
- Defined in:
- lib/mongoid/persistable/deletable.rb
Overview
Defines behaviour for persistence operations that delete documents.
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#delete(options = {}) ⇒ TrueClass
(also: #remove)
Remove the document from the database.
Instance Method Details
#delete(options = {}) ⇒ TrueClass Also known as: remove
Remove the document from the database.
21 22 23 24 25 26 27 28 29 |
# File 'lib/mongoid/persistable/deletable.rb', line 21 def delete( = {}) prepare_delete do if () else delete_as_root end end end |