Exception: Mongoid::Errors::MixedRelations
- Inherits:
-
MongoidError
- Object
- StandardError
- MongoidError
- Mongoid::Errors::MixedRelations
- Defined in:
- lib/mongoid/errors/mixed_relations.rb
Overview
This error is raised when trying to reference an embedded document from a document in another collection that is not its parent.
Constant Summary
Constants inherited from MongoidError
Mongoid::Errors::MongoidError::BASE_KEY
Instance Method Summary collapse
-
#initialize(root_klass, embedded_klass) ⇒ MixedRelations
constructor
A new instance of MixedRelations.
Methods inherited from MongoidError
Constructor Details
#initialize(root_klass, embedded_klass) ⇒ MixedRelations
Returns a new instance of MixedRelations.
22 23 24 25 26 27 28 29 |
# File 'lib/mongoid/errors/mixed_relations.rb', line 22 def initialize(root_klass, ) super( ( "mixed_relations", { root: root_klass, embedded: } ) ) end |