lib/mongoid/persistence.rb
# Remove the document from the database with callbacks.
#
# @example Destroy a document.
#   document.destroy
#
# @param [ Hash ] options Options to pass to destroy.
#
# @return [ true, false ] True if successful, false if not.
Remove the document from the database with callbacks.
Remove the document from the database with callbacks .
def destroy(options = {})
      self.flagged_for_destroy = true
      result = run_callbacks(:destroy) do
        remove(options)
      end
      self.flagged_for_destroy = false
      result
    end
def destroy ( options = { } ) self . flagged_for_destroy = true result = run_callbacks ( :destroy ) do remove ( options ) end self . flagged_for_destroy = false result end
Remove the document from the database with callbacks.
Remove the document from the database with callbacks .
True if successful, false if not.
True if successful false if not .
 true, false 
options
<not_specific>
<not_specific>
options Options to pass to destroy.
options Options to pass to destroy .
example
Destroy a document. document.destroy
Destroy a document . document . destroy