Module: Mongoid::GlobalDiscriminatorKeyAssignment Private
Do not use. This module is for internal use only.
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Extension / Inclusion / Inheritance Descendants | |
Extended In:
| |
Defined in: | lib/mongoid.rb |
Overview
Module used to prepend the discriminator key assignment function to change the value assigned to the discriminator key to a string.
Instance Attribute Summary
-
#discriminator_key=(value)
writeonly
Internal use only
Sets the global discriminator key name.
Instance Attribute Details
#discriminator_key=(value) (writeonly)
Sets the global discriminator key name.
# 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