Exception: Mongoid::Errors::InvalidSetPolymorphicRelation
- Inherits:
-
MongoidError
- Object
- StandardError
- MongoidError
- Mongoid::Errors::InvalidSetPolymorphicRelation
- Defined in:
- lib/mongoid/errors/invalid_set_polymorphic_relation.rb
Overview
Raised when trying to set a polymorphic “references in” relation to a model with multiple “references many/one” relations pointing to that first model.
Constant Summary
Constants inherited from MongoidError
Instance Method Summary collapse
-
#initialize(name, klass, other_klass) ⇒ InvalidSetPolymorphicRelation
constructor
Create the new invalid set polymorphic relation error.
Methods inherited from MongoidError
Constructor Details
#initialize(name, klass, other_klass) ⇒ InvalidSetPolymorphicRelation
Create the new invalid set polymorphic relation error.
33 34 35 |
# File 'lib/mongoid/errors/invalid_set_polymorphic_relation.rb', line 33 def initialize(name, klass, other_klass) super(("invalid_set_polymorphic_relation", { name: name, klass: klass, other_klass: other_klass })) end |