Module: Mongoid::Extensions::DateTime
Relationships & Source Files | |
Namespace Children | |
Modules:
| |
Extension / Inclusion / Inheritance Descendants | |
Included In:
| |
Defined in: | lib/mongoid/extensions/date_time.rb |
Overview
Adds type-casting behavior to Time
class.
Instance Method Summary
-
#__mongoize_time__ ⇒ Time | ActiveSupport::TimeWithZone
Mongoize the date time into a time.
-
#mongoize ⇒ Time
Turn the object from the ruby type we deal with to a Mongo friendly type.
Instance Method Details
#__mongoize_time__ ⇒ Time | ActiveSupport::TimeWithZone
Mongoize the date time into a time.
# File 'lib/mongoid/extensions/date_time.rb', line 16
def __mongoize_time__ in_time_zone(::Time.zone) end
#mongoize ⇒ Time
Turn the object from the ruby type we deal with to a Mongo friendly type.