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.
25 26 27 28 |
# File 'lib/active_item/errors.rb', line 25 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.
23 24 25 |
# File 'lib/active_item/errors.rb', line 23 def record @record end |