class Mongoid::Errors::DocumentNotDestroyed

Raised when attempting to destroy a document that had destory callbacks return false.

@since 4.0.0

Public Class Methods

new(id, klass) click to toggle source

Instnatiate the exception.

@example Create the error.

DocumentNotDestroyed.new(Band)

@param [ Object ] id The document id. @param [ Class ] klass The document class.

@since 4.0.0

Calls superclass method
# File lib/mongoid/errors/document_not_destroyed.rb, line 22
def initialize(id, klass)
  super(compose_message("document_not_destroyed", { id: id.inspect, klass: klass }))
end