Module: Mongoid::GlobalDiscriminatorKeyAssignment Private
- Included in:
- Mongoid
- Defined in:
- lib/mongoid.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Module used to prepend the discriminator key assignment function to change the value assigned to the discriminator key to a string.
Defined Under Namespace
Classes: InvalidFieldHost
Instance Method Summary collapse
-
#discriminator_key=(value) ⇒ Object
private
Sets the global discriminator key name.
Instance Method Details
#discriminator_key=(value) ⇒ Object
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.
Sets the global discriminator key name.
161 162 163 164 165 |
# File 'lib/mongoid.rb', line 161 def discriminator_key=(value) Mongoid::Fields::Validators::Macro.validate_field_name(InvalidFieldHost, value) value = value.to_s super end |