Exception: Mongoid::Errors::AttributeNotLoaded
- Inherits:
-
MongoidError
- Object
- StandardError
- MongoidError
- Mongoid::Errors::AttributeNotLoaded
- Defined in:
- lib/mongoid/errors/attribute_not_loaded.rb
Overview
Raised when attempting to read or write an attribute which has not been loaded. This can occur when using .only or .without query projection methods.
Constant Summary
Constants inherited from MongoidError
Instance Attribute Summary
Attributes inherited from MongoidError
#problem, #resolution, #summary
Instance Method Summary collapse
-
#initialize(klass, name) ⇒ AttributeNotLoaded
constructor
Create the new error.
Methods inherited from MongoidError
Constructor Details
#initialize(klass, name) ⇒ AttributeNotLoaded
Create the new error.
27 28 29 30 31 |
# File 'lib/mongoid/errors/attribute_not_loaded.rb', line 27 def initialize(klass, name) super( ("attribute_not_loaded", { klass: klass.name, name: name }) ) end |