Sha256: 05755f5acfef491492fe3c2763c248cb2237eeaab7b64e52b2bb07747f7cdc4c

Contents?: true

Size: 305 Bytes

Versions: 30

Compression:

Stored size: 305 Bytes

Contents

module Gummi
  module DbLayer
    module Fields
      class Time < Virtus::Attribute

        def coerce(value)
          return nil unless value.respond_to? :in_time_zone
          value.in_time_zone 'UTC'
        end

        def mapping
          {type: "date"}
        end
      end
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
gummi-1.0.10 lib/gummi/db_layer/fields/time.rb
gummi-1.0.9 lib/gummi/db_layer/fields/time.rb
gummi-1.0.8 lib/gummi/db_layer/fields/time.rb
gummi-1.0.7 lib/gummi/db_layer/fields/time.rb
gummi-1.0.6 lib/gummi/db_layer/fields/time.rb
gummi-1.0.5 lib/gummi/db_layer/fields/time.rb
gummi-1.0.4 lib/gummi/db_layer/fields/time.rb
gummi-0.3.16 lib/gummi/db_layer/fields/time.rb
gummi-1.0.3 lib/gummi/db_layer/fields/time.rb
gummi-1.0.2 lib/gummi/db_layer/fields/time.rb
gummi-1.0.0 lib/gummi/db_layer/fields/time.rb
gummi-0.3.14 lib/gummi/db_layer/fields/time.rb
gummi-0.3.13 lib/gummi/db_layer/fields/time.rb
gummi-0.3.12 lib/gummi/db_layer/fields/time.rb
gummi-0.3.11 lib/gummi/db_layer/fields/time.rb
gummi-0.3.10 lib/gummi/db_layer/fields/time.rb
gummi-0.3.9 lib/gummi/db_layer/fields/time.rb
gummi-0.3.8 lib/gummi/db_layer/fields/time.rb
gummi-0.3.7 lib/gummi/db_layer/fields/time.rb
gummi-0.3.6 lib/gummi/db_layer/fields/time.rb