Sha256: 4beabdba090eb86cdf75a945cdcbb71de08d2989f9b606957757843729568ea9

Contents?: true

Size: 278 Bytes

Versions: 12

Compression:

Stored size: 278 Bytes

Contents

module Mongoid #:nodoc:
  module Extensions #:nodoc:
    module Date #:nodoc:
      module Conversions #:nodoc:
        def set(value)
          value.to_time.utc
        end
        def get(value)
          value ? value.to_date : value
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
mongoid-0.7.3 lib/mongoid/extensions/date/conversions.rb
mongoid-0.7.2 lib/mongoid/extensions/date/conversions.rb
mongoid-0.7.1 lib/mongoid/extensions/date/conversions.rb
mongoid-0.7.0 lib/mongoid/extensions/date/conversions.rb
mongoid-0.6.10 lib/mongoid/extensions/date/conversions.rb
mongoid-0.6.9 lib/mongoid/extensions/date/conversions.rb
mongoid-0.6.8 lib/mongoid/extensions/date/conversions.rb
mongoid-0.6.7 lib/mongoid/extensions/date/conversions.rb
mongoid-0.6.6 lib/mongoid/extensions/date/conversions.rb
mongoid-0.6.5 lib/mongoid/extensions/date/conversions.rb
mongoid-0.6.4 lib/mongoid/extensions/date/conversions.rb
mongoid-0.6.3 lib/mongoid/extensions/date/conversions.rb