Module: Mongoid::Extensions::Symbol::ClassMethods
- Defined in:
- lib/mongoid/extensions/symbol.rb
Instance Method Summary collapse
-
#demongoize(object) ⇒ Symbol
Convert the object from its mongo friendly ruby type to this type.
-
#mongoize(object) ⇒ Symbol
Turn the object from the ruby type we deal with to a Mongo friendly type.
Instance Method Details
#demongoize(object) ⇒ Symbol
Convert the object from its mongo friendly ruby type to this type.
30 31 32 |
# File 'lib/mongoid/extensions/symbol.rb', line 30 def demongoize(object) object.try(:to_sym) end |
#mongoize(object) ⇒ Symbol
Turn the object from the ruby type we deal with to a Mongo friendly type.
45 46 47 |
# File 'lib/mongoid/extensions/symbol.rb', line 45 def mongoize(object) demongoize(object) end |