Exception: Mongoid::Errors::UnknownModel
- Inherits:
-
MongoidError
- Object
- StandardError
- MongoidError
- Mongoid::Errors::UnknownModel
- Defined in:
- 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.
18 19 20 21 22 |
# File 'lib/mongoid/errors/unknown_model.rb', line 18 def initialize(klass, value) super( ("unknown_model", { klass: klass, value: value }) ) end |