Class: ActiveModel::NestedError
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Forwardable,
Error
|
|
Instance Chain:
self,
Error
|
|
Inherits: |
ActiveModel::Error
|
Defined in: | activemodel/lib/active_model/nested_error.rb |
Constant Summary
Error
- Inherited
Class Attribute Summary
Class Method Summary
Instance Attribute Summary
- #inner_error readonly
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
Error
- Inherited
#detail | Alias for Error#details. |
#details | Returns the error details. |
#eql? | Alias for 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(base, inner_error, override_options = {}) ⇒ NestedError
# File 'activemodel/lib/active_model/nested_error.rb', line 8
def initialize(base, inner_error, = {}) @base = base @inner_error = inner_error @attribute = .fetch(:attribute) { inner_error.attribute } @type = .fetch(:type) { inner_error.type } @raw_type = inner_error.raw_type @options = inner_error. end
Instance Attribute Details
#inner_error (readonly)
[ GitHub ]# File 'activemodel/lib/active_model/nested_error.rb', line 17
attr_reader :inner_error