Exception: ActiveItem::RecordNotDestroyed

Inherits:
StandardError
  • Object
show all
Defined in:
lib/active_item/errors.rb

Overview

Raised by destroy! when the record is not destroyed.

Instance Attribute Summary collapse

Instance Method Summary collapse

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(message = nil, record = nil)
  @record = record
  super(message || 'Failed to destroy the record')
end

Instance Attribute Details

#recordObject (readonly)

Returns the value of attribute record.



23
24
25
# File 'lib/active_item/errors.rb', line 23

def record
  @record
end