Exception: Mongoid::Errors::DeleteRestriction
- Inherits:
-
MongoidError
- Object
- StandardError
- MongoidError
- Mongoid::Errors::DeleteRestriction
- Defined in:
- build/mongoid-7.3/lib/mongoid/errors/delete_restriction.rb
Overview
This error is raised when attempting to destroy a model which has an association with dependency option set to restrict.
Constant Summary
Constants inherited from MongoidError
Instance Attribute Summary
Attributes inherited from MongoidError
#problem, #resolution, #summary
Instance Method Summary collapse
-
#initialize(document, association_name) ⇒ DeleteRestriction
constructor
Create the new callbacks error.
Methods inherited from MongoidError
Constructor Details
#initialize(document, association_name) ⇒ DeleteRestriction
Create the new callbacks error.
19 20 21 22 23 24 25 26 |
# File 'build/mongoid-7.3/lib/mongoid/errors/delete_restriction.rb', line 19 def initialize(document, association_name) super( ( "delete_restriction", { document: document.class, relation: association_name } ) ) end |