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 it’s parent.
Constant Summary
Constants inherited from MongoidError
Mongoid::Errors::MongoidError::BASE_KEY
Instance Attribute Summary collapse
- #embedded_klass ⇒ Object readonly
- #root_klass ⇒ Object readonly
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.
25 26 27 28 29 30 31 32 33 34 |
# File 'lib/mongoid/errors/mixed_relations.rb', line 25 def initialize(root_klass, ) @root_klass, @embedded_klass = root_klass, super( translate( "mixed_relations", { :root => root_klass, :embedded => } ) ) end |