Class: ActiveRecord::Associations::NestedError
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
::ActiveModel::NestedError ,
Forwardable,
::ActiveModel::Error
|
|
Instance Chain:
|
|
Inherits: |
ActiveModel::NestedError
|
Defined in: | activerecord/lib/active_record/associations/nested_error.rb |
Constant Summary
::ActiveModel::Error
- Inherited
Class Attribute Summary
Class Method Summary
- .new(association, inner_error) ⇒ NestedError constructor
::ActiveModel::NestedError
- Inherited
::ActiveModel::Error
- Inherited
Instance Attribute Summary
::ActiveModel::NestedError
- Inherited
::ActiveModel::Error
- Inherited
#attribute | The attribute of |
#base | The object which the error belongs to. |
#i18n_customize_full_message, #i18n_customize_full_message?, | |
#options | The options provided when calling |
#raw_type | The raw value provided as the second parameter when calling |
#type | The type of error, defaults to |
Instance Method Summary
::ActiveModel::Error
- Inherited
#detail | Alias for ActiveModel::Error#details. |
#details | Returns the error details. |
#eql? | Alias for ActiveModel::Error#==. |
#full_message | Returns the full error message. |
#match? | See if error matches provided |
#message | Returns the error message. |
#strict_match? | See if error matches provided |
Constructor Details
.new(association, inner_error) ⇒ NestedError
# File 'activerecord/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