Module: Mongoid::Extensions::TimeWithZone::ClassMethods
- Defined in:
- lib/mongoid/extensions/time_with_zone.rb
Instance Method Summary collapse
-
#demongoize(object) ⇒ TimeWithZone
Convert the object from it’s mongo friendly ruby type to this type.
-
#mongoize(object) ⇒ Time
Turn the object from the ruby type we deal with to a Mongo friendly type.
Instance Method Details
#demongoize(object) ⇒ TimeWithZone
Convert the object from it’s mongo friendly ruby type to this type.
31 32 33 |
# File 'lib/mongoid/extensions/time_with_zone.rb', line 31 def demongoize(object) ::Time.demongoize(object).in_time_zone end |
#mongoize(object) ⇒ Time
Turn the object from the ruby type we deal with to a Mongo friendly type.
46 47 48 |
# File 'lib/mongoid/extensions/time_with_zone.rb', line 46 def mongoize(object) ::Time.mongoize(object) end |