Module: Mongoid::Extensions::Symbol::ClassMethods
- Defined in:
- lib/mongoid/extensions/symbol.rb
Instance Method Summary collapse
-
#mongoize(object) ⇒ Symbol | nil
(also: #demongoize)
Turn the object from the ruby type we deal with to a Mongo friendly type.
Instance Method Details
#mongoize(object) ⇒ Symbol | nil Also known as: demongoize
Turn the object from the ruby type we deal with to a Mongo friendly type.
33 34 35 |
# File 'lib/mongoid/extensions/symbol.rb', line 33 def mongoize(object) object.try(:to_sym) end |