Exception: Mongoid::Errors::InvalidValue
- Inherits:
-
MongoidError
- Object
- StandardError
- MongoidError
- Mongoid::Errors::InvalidValue
- Defined in:
- 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 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.
9 10 11 12 13 |
# File 'lib/mongoid/errors/invalid_value.rb', line 9 def initialize(field_class, value_class) super( ("invalid_value", { value_class: value_class, field_class: field_class }) ) end |