Exception: SimpleRecord::RecordNotSaved
- Inherits:
-
SimpleRecordError
- Object
- StandardError
- SimpleRecordError
- SimpleRecord::RecordNotSaved
- Defined in:
- lib/simple_record/errors.rb
Instance Attribute Summary collapse
-
#record ⇒ Object
Returns the value of attribute record.
Instance Method Summary collapse
-
#initialize(record = nil) ⇒ RecordNotSaved
constructor
A new instance of RecordNotSaved.
Constructor Details
#initialize(record = nil) ⇒ RecordNotSaved
Returns a new instance of RecordNotSaved.
11 12 13 14 |
# File 'lib/simple_record/errors.rb', line 11 def initialize(record=nil) @record = record super("Validation failed: #{@record.errors..join(", ")}") end |
Instance Attribute Details
#record ⇒ Object
Returns the value of attribute record.
9 10 11 |
# File 'lib/simple_record/errors.rb', line 9 def record @record end |