Exception: Mongoid::Errors::InvalidValue
- Inherits:
-
MongoidError
- Object
- StandardError
- MongoidError
- Mongoid::Errors::InvalidValue
- Defined in:
- build/mongoid-7.3/lib/mongoid/errors/invalid_value.rb
Overview
This error is raised when trying to set an attribute with an invalid value. For example when try to set an Array value to a Hash attribute.
Constant Summary
Constants inherited from MongoidError
Instance Attribute Summary
Attributes inherited from MongoidError
#problem, #resolution, #summary
Instance Method Summary collapse
-
#initialize(field_class, value_class) ⇒ InvalidValue
constructor
A new instance of InvalidValue.
Methods inherited from MongoidError
Constructor Details
#initialize(field_class, value_class) ⇒ InvalidValue
Returns a new instance of InvalidValue.
11 12 13 14 15 |
# File 'build/mongoid-7.3/lib/mongoid/errors/invalid_value.rb', line 11 def initialize(field_class, value_class) super( ("invalid_value", { value_class: value_class, field_class: field_class }) ) end |