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.



49
50
51
52
# File 'lib/active_item/errors.rb', line 49

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.



47
48
49
# File 'lib/active_item/errors.rb', line 47

def record
  @record
end