Class: ActiveRecord::Associations::NestedError
- Inherits:
-
ActiveModel::NestedError
- Object
- ActiveModel::NestedError
- ActiveRecord::Associations::NestedError
- Defined in:
- lib/active_record/associations/nested_error.rb
Instance Method Summary collapse
-
#initialize(association, inner_error) ⇒ NestedError
constructor
A new instance of NestedError.
Constructor Details
#initialize(association, inner_error) ⇒ NestedError
Returns a new instance of NestedError.
8 9 10 11 12 13 |
# File 'lib/active_record/associations/nested_error.rb', line 8 def initialize(association, inner_error) @base = association.owner @association = association @inner_error = inner_error super(@base, inner_error, { attribute: compute_attribute(inner_error) }) end |