module Mongoid::Extensions::String::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.
String.mongoize("123.11")
@param [ Object
] object The object to mongoize.
@return [ String
] The object mongoized.
# File lib/mongoid/extensions/string.rb, line 169 def mongoize(object) object.try(:to_s) end
Also aliased as: demongoize