Exception: ActiveItem::DeleteRestrictionError
- Inherits:
-
StandardError
- Object
- StandardError
- ActiveItem::DeleteRestrictionError
- Defined in:
- lib/active_item/errors.rb
Overview
Raised when a record cannot be deleted because dependent associations with :restrict_with_exception still exist.
Instance Attribute Summary collapse
-
#association_name ⇒ Object
readonly
Returns the value of attribute association_name.
Instance Method Summary collapse
-
#initialize(association_name) ⇒ DeleteRestrictionError
constructor
A new instance of DeleteRestrictionError.
Constructor Details
#initialize(association_name) ⇒ DeleteRestrictionError
Returns a new instance of DeleteRestrictionError.
26 27 28 29 |
# File 'lib/active_item/errors.rb', line 26 def initialize(association_name) @association_name = association_name super("Cannot delete record because dependent #{association_name} exist") end |
Instance Attribute Details
#association_name ⇒ Object (readonly)
Returns the value of attribute association_name.
24 25 26 |
# File 'lib/active_item/errors.rb', line 24 def association_name @association_name end |