Exception: Discard::RecordNotUndiscarded

Inherits:
DiscardError
  • Object
show all
Defined in:
lib/discard/errors.rb

Overview

Raised by Model#undiscard!

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(message = nil, record = nil) ⇒ RecordNotUndiscarded

Returns a new instance of RecordNotUndiscarded.



24
25
26
27
# File 'lib/discard/errors.rb', line 24

def initialize(message = nil, record = nil)
  @record = record
  super(message)
end

Instance Attribute Details

#recordObject (readonly)

Returns the value of attribute record.



22
23
24
# File 'lib/discard/errors.rb', line 22

def record
  @record
end