Class: ActiveLayer::ActiveRecord::RecordInvalidError
- Inherits:
-
ActiveRecord::RecordInvalidError
- Object
- ActiveRecord::RecordInvalidError
- ActiveLayer::ActiveRecord::RecordInvalidError
- Defined in:
- lib/active_layer/active_record/persistence.rb
Overview
override the initialize because the submodels should handle their own translations This will allow drop in compatibility with existing functionality
Instance Attribute Summary collapse
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Instance Method Summary collapse
-
#initialize(record) ⇒ RecordInvalidError
constructor
A new instance of RecordInvalidError.
Constructor Details
#initialize(record) ⇒ RecordInvalidError
Returns a new instance of RecordInvalidError.
9 10 11 12 |
# File 'lib/active_layer/active_record/persistence.rb', line 9 def initialize(record) @record = record super(@record.errors..join(", ")) end |
Instance Attribute Details
#record ⇒ Object (readonly)
Returns the value of attribute record.
8 9 10 |
# File 'lib/active_layer/active_record/persistence.rb', line 8 def record @record end |