Sha256: 5db8c3eba3538174401f046e110408f4cdf9804573d1d96960199104b2ae1065

Contents?: true

Size: 323 Bytes

Versions: 10

Compression:

Stored size: 323 Bytes

Contents

module Mongoid #:nodoc:
  module Extensions #:nodoc:
    module Date #:nodoc:
      module Conversions #:nodoc:
        def set(value)
          value.to_date.at_midnight.to_time unless value.blank?
        end
        def get(value)
          value ? value.getlocal.to_date : value
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
mongoid-0.9.4 lib/mongoid/extensions/date/conversions.rb
mongoid-0.9.3 lib/mongoid/extensions/date/conversions.rb
mongoid-0.9.2 lib/mongoid/extensions/date/conversions.rb
mongoid-0.9.1 lib/mongoid/extensions/date/conversions.rb
mongoid-0.9.0 lib/mongoid/extensions/date/conversions.rb
mongoid-0.8.10 lib/mongoid/extensions/date/conversions.rb
mongoid-0.8.9 lib/mongoid/extensions/date/conversions.rb
mongoid-0.8.8 lib/mongoid/extensions/date/conversions.rb
mongoid-0.8.7 lib/mongoid/extensions/date/conversions.rb
mongoid-0.8.6 lib/mongoid/extensions/date/conversions.rb