Class: ActiveLayer::ActiveRecord::RecordInvalidError

Inherits:
ActiveRecord::RecordInvalidError
  • Object
show all
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

Instance Method Summary collapse

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.full_messages.join(", "))
end

Instance Attribute Details

#recordObject (readonly)

Returns the value of attribute record.



8
9
10
# File 'lib/active_layer/active_record/persistence.rb', line 8

def record
  @record
end