Module: Mongoid::Extensions::String::ClassMethods
- Defined in:
- lib/mongoid/extensions/string.rb
Instance Method Summary collapse
-
#demongoize(object) ⇒ String
Convert the object from its mongo friendly ruby type to this type.
-
#mongoize(object) ⇒ String
Turn the object from the ruby type we deal with to a Mongo friendly type.
Instance Method Details
#demongoize(object) ⇒ String
Convert the object from its mongo friendly ruby type to this type.
160 161 162 |
# File 'lib/mongoid/extensions/string.rb', line 160 def demongoize(object) object.try(:to_s) end |
#mongoize(object) ⇒ String
Turn the object from the ruby type we deal with to a Mongo friendly type.
173 174 175 |
# File 'lib/mongoid/extensions/string.rb', line 173 def mongoize(object) demongoize(object) end |