Exception: ActiveLayer::RecordInvalidError

Inherits:
RuntimeError
  • Object
show all
Defined in:
lib/active_layer/persistence.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record) ⇒ RecordInvalidError

Returns a new instance of RecordInvalidError.



63
64
65
66
# File 'lib/active_layer/persistence.rb', line 63

def initialize(record)
  @record = record
  super(@record.errors.full_messages.join(", "))
end

Instance Attribute Details

#recordObject (readonly)

Returns the value of attribute record.



62
63
64
# File 'lib/active_layer/persistence.rb', line 62

def record
  @record
end