Exception: Mongoid::Errors::DeleteRestriction
- Inherits:
-
MongoidError
- Object
- StandardError
- MongoidError
- Mongoid::Errors::DeleteRestriction
- Defined in:
- lib/mongoid/errors/delete_restriction.rb
Overview
This error is raised when calling #save! or .create! on a model when one of the callbacks returns false.
Constant Summary
Constants inherited from MongoidError
Instance Method Summary collapse
-
#initialize(document, relation) ⇒ DeleteRestriction
constructor
Create the new callbacks error.
Methods inherited from MongoidError
Constructor Details
#initialize(document, relation) ⇒ DeleteRestriction
Create the new callbacks error.
18 19 20 21 22 23 24 25 |
# File 'lib/mongoid/errors/delete_restriction.rb', line 18 def initialize(document, relation) super( ( "delete_restriction", { document: document.class, relation: relation } ) ) end |