Class: Gummi::DbLayer::Fields::Time
- Inherits:
-
Virtus::Attribute
- Object
- Virtus::Attribute
- Gummi::DbLayer::Fields::Time
- Defined in:
- lib/gummi/db_layer/fields/time.rb
Instance Method Summary collapse
Instance Method Details
#coerce(value) ⇒ Object
6 7 8 9 |
# File 'lib/gummi/db_layer/fields/time.rb', line 6 def coerce(value) return nil unless value.respond_to? :in_time_zone value.in_time_zone 'UTC' end |
#mapping ⇒ Object
11 12 13 |
# File 'lib/gummi/db_layer/fields/time.rb', line 11 def mapping {type: "date"} end |