Exception: Mongoid::MultiParameterAttributes::Errors::AttributeAssignmentError
- Inherits:
-
Errors::MongoidError
- Object
- StandardError
- Errors::MongoidError
- Mongoid::MultiParameterAttributes::Errors::AttributeAssignmentError
- Defined in:
- lib/mongoid/multi_parameter_attributes.rb
Overview
Raised when an error occurred while doing a mass assignment to an attribute through the attributes= method. The exception has an attribute property that is the name of the offending attribute.
Constant Summary
Constant Summary
Constants inherited from Errors::MongoidError
Errors::MongoidError::BASE_KEY
Instance Attribute Summary (collapse)
-
- (Object) attribute
readonly
Returns the value of attribute attribute.
-
- (Object) exception
readonly
Returns the value of attribute exception.
Instance Method Summary (collapse)
-
- (AttributeAssignmentError) initialize(message, exception, attribute)
constructor
A new instance of AttributeAssignmentError.
Methods inherited from Errors::MongoidError
#compose_message, #problem, #resolution, #summary, #translate
Constructor Details
- (AttributeAssignmentError) initialize(message, exception, attribute)
A new instance of AttributeAssignmentError
17 18 19 20 21 |
# File 'lib/mongoid/multi_parameter_attributes.rb', line 17 def initialize(, exception, attribute) @exception = exception @attribute = attribute @message = end |
Instance Attribute Details
- (Object) attribute (readonly)
Returns the value of attribute attribute
15 16 17 |
# File 'lib/mongoid/multi_parameter_attributes.rb', line 15 def attribute @attribute end |
- (Object) exception (readonly)
Returns the value of attribute exception
15 16 17 |
# File 'lib/mongoid/multi_parameter_attributes.rb', line 15 def exception @exception end |