module Mongoid::Extensions::Symbol::ClassMethods
Public Instance Methods
demongoize(object)
click to toggle source
Convert the object from its mongo friendly ruby type to this type.
@example Demongoize the object.
Symbol.demongoize(object)
@param [ Object
] object The object to demongoize.
@return [ Symbol
] The object.
@since 3.0.0
# File lib/mongoid/extensions/symbol.rb, line 32 def demongoize(object) object.try(:to_sym) end
mongoize(object)
click to toggle source
Turn the object from the ruby type we deal with to a Mongo friendly type.
@example Mongoize the object.
Symbol.mongoize("123.11")
@param [ Object
] object The object to mongoize.
@return [ Symbol
] The object mongoized.
@since 3.0.0
# File lib/mongoid/extensions/symbol.rb, line 47 def mongoize(object) demongoize(object) end