Method: Mongoid::Document::ClassMethods#_mongoid_clear_types
- Defined in:
- lib/mongoid/document.rb
#_mongoid_clear_types ⇒ 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.
Clear the @_type cache. This is generally called when changing the discriminator key/value on a class.
463 464 465 466 |
# File 'lib/mongoid/document.rb', line 463 def _mongoid_clear_types @_types = nil superclass._mongoid_clear_types if hereditary? end |