Exception: Mongoid::Errors::InvalidDiscriminatorKeyTarget Private

Inherits:
MongoidError
  • Object
show all
Defined in:
build/mongoid-master/lib/mongoid/errors/invalid_discriminator_key_target.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Creates the exception raised when trying to set or get the discriminator key on a child class.

Constant Summary

Constants inherited from MongoidError

MongoidError::BASE_KEY

Instance Attribute Summary

Attributes inherited from MongoidError

#problem, #resolution, #summary

Instance Method Summary collapse

Methods inherited from MongoidError

#compose_message

Constructor Details

#initialize(class_name, superclass) ⇒ InvalidDiscriminatorKeyTarget

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of InvalidDiscriminatorKeyTarget.



15
16
17
18
19
20
21
22
# File 'build/mongoid-master/lib/mongoid/errors/invalid_discriminator_key_target.rb', line 15

def initialize(class_name, superclass)
  super(
    compose_message(
      "invalid_discriminator_key_target",
      { class_name: class_name, superclass: superclass }
    )
  )
end