Sha256: 9f12ee0fd1dc72158c974718f6be18008db5feaa0478f1771f8cb35865596db6
Contents?: true
Size: 204 Bytes
Versions: 2
Compression:
Stored size: 204 Bytes
Contents
class Timestamp def self.get(value) if value.nil? || value == '' nil else Time.zone.at(value.to_i) end end def self.set(value) value.to_i end end Time.zone ||= 'UTC'
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
mongoid_ext-0.6.2 | lib/mongoid_ext/types/timestamp.rb |
mongoid_ext-0.6.1 | lib/mongoid_ext/types/timestamp.rb |