Exception: Mongoid::Errors::UnknownModel
- Inherits:
-
MongoidError
- Object
- StandardError
- MongoidError
- Mongoid::Errors::UnknownModel
- Defined in:
- build/mongoid-7.3/lib/mongoid/errors/unknown_model.rb
Overview
This error is raised when trying to instantiate a model object from the value in the ‘_type’ field of a document and the class doesn’t exist.
Constant Summary
Constants inherited from MongoidError
Instance Attribute Summary
Attributes inherited from MongoidError
#problem, #resolution, #summary
Instance Method Summary collapse
-
#initialize(klass, value) ⇒ UnknownModel
constructor
Create the new error.
Methods inherited from MongoidError
Constructor Details
#initialize(klass, value) ⇒ UnknownModel
Create the new error.
20 21 22 23 24 |
# File 'build/mongoid-7.3/lib/mongoid/errors/unknown_model.rb', line 20 def initialize(klass, value) super( ("unknown_model", { klass: klass, value: value }) ) end |