Exception: Edifice::Forms::FormModel::RecordInvalid

Inherits:
Exception
  • Object
show all
Defined in:
lib/edifice-forms/form_model.rb

Overview

more or less the same as activerecord’s one

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record) ⇒ RecordInvalid

Returns a new instance of RecordInvalid.



15
16
17
18
19
# File 'lib/edifice-forms/form_model.rb', line 15

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

Instance Attribute Details

#recordObject (readonly)

Returns the value of attribute record.



14
15
16
# File 'lib/edifice-forms/form_model.rb', line 14

def record
  @record
end