Exception: ActiveItem::RecordNotDestroyed
- Inherits:
-
StandardError
- Object
- StandardError
- ActiveItem::RecordNotDestroyed
- Defined in:
- lib/active_item/errors.rb
Overview
Raised by destroy! when the record is not destroyed.
Instance Attribute Summary collapse
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
-
#initialize(message = nil, record = nil) ⇒ RecordNotDestroyed
constructor
A new instance of RecordNotDestroyed.
Constructor Details
#initialize(message = nil, record = nil) ⇒ RecordNotDestroyed
Returns a new instance of RecordNotDestroyed.
38 39 40 41 |
# File 'lib/active_item/errors.rb', line 38 def initialize( = nil, record = nil) @record = record super( || 'Failed to destroy the record') end |
Instance Attribute Details
#record ⇒ Object (readonly)
Returns the value of attribute record.
36 37 38 |
# File 'lib/active_item/errors.rb', line 36 def record @record end |