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 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.
17 18 19 20 21 22 23 24 |
# File 'lib/mongoid/errors/delete_restriction.rb', line 17 def initialize(document, association_name) super( ( "delete_restriction", { document: document.class, relation: association_name } ) ) end |