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” association to a model with multiple “references many/one” associations pointing to that first model.
Constant Summary
Constants inherited from MongoidError
Instance Attribute Summary
Attributes inherited from MongoidError
#problem, #resolution, #summary
Instance Method Summary collapse
-
#initialize(name, klass, other_klass) ⇒ InvalidSetPolymorphicRelation
constructor
Create the new invalid set polymorphic association error.
Methods inherited from MongoidError
Constructor Details
#initialize(name, klass, other_klass) ⇒ InvalidSetPolymorphicRelation
Create the new invalid set polymorphic association error.
34 35 36 |
# File 'lib/mongoid/errors/invalid_set_polymorphic_relation.rb', line 34 def initialize(name, klass, other_klass) super(("invalid_set_polymorphic_relation", { name: name, klass: klass, other_klass: other_klass })) end |