Exception: Edifice::Forms::FormModel::RecordInvalid
- Inherits:
-
Exception
- Object
- Exception
- Edifice::Forms::FormModel::RecordInvalid
- Defined in:
- lib/edifice-forms/form_model.rb
Overview
more or less the same as activerecord’s one
Instance Attribute Summary collapse
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
-
#initialize(record) ⇒ RecordInvalid
constructor
A new instance of RecordInvalid.
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..join(", ") super(errors) end |
Instance Attribute Details
#record ⇒ Object (readonly)
Returns the value of attribute record.
14 15 16 |
# File 'lib/edifice-forms/form_model.rb', line 14 def record @record end |