Method: Mongoid::Document::ClassMethods#_mongoid_clear_types

Defined in:
lib/mongoid/document.rb

#_mongoid_clear_typesObject

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.

Clear the @_type cache. This is generally called when changing the discriminator key/value on a class.

Examples:

Get the types.

document._mongoid_clear_types


463
464
465
466
# File 'lib/mongoid/document.rb', line 463

def _mongoid_clear_types
  @_types = nil
  superclass._mongoid_clear_types if hereditary?
end