Module: Mongoid::Extensions::TimeWithZone

Defined in:
lib/mongoid/extensions/time_with_zone.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#mongoizeTime

Turn the object from the ruby type we deal with to a Mongo friendly type.

Examples:

Mongoize the object.

date_time.mongoize

Returns:

  • (Time)

    The object mongoized.

Since:

  • 3.0.0


15
16
17
# File 'lib/mongoid/extensions/time_with_zone.rb', line 15

def mongoize
  ::ActiveSupport::TimeWithZone.mongoize(self)
end