Object
Defines the behaviour for date time fields.
Deserialize this field from the type stored in MongoDB to the type defined on the model.
@example Deserialize the field.
field.deserialize(object)
@param [ Object ] object The object to cast.
@return [ DateTime ] The converted date time.
@since 2.1.0
# File lib/mongoid/fields/serializable/date_time.rb, line 21 def deserialize(object) object.try(:to_datetime) end
Generated with the Darkfish Rdoc Generator 2.