Method: Mongoid::Errors::InvalidSetPolymorphicRelation#initialize

Defined in:
lib/mongoid/errors/invalid_set_polymorphic_relation.rb

#initialize(name, klass, other_klass) ⇒ InvalidSetPolymorphicRelation

Create the new invalid set polymorphic association error.

Examples:

Create the error.

InvalidSetPolymorphicRelation.new


34
35
36
# File 'lib/mongoid/errors/invalid_set_polymorphic_relation.rb', line 34

def initialize(name, klass, other_klass)
  super(compose_message("invalid_set_polymorphic_relation", { name: name, klass: klass, other_klass: other_klass }))
end