module Mongoid::Extensions::Symbol::ClassMethods
Public Instance Methods
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
| nil ] The object mongoized or nil.
# File lib/mongoid/extensions/symbol.rb, line 33 def mongoize(object) object.try(:to_sym) end
Also aliased as: demongoize