Sha256: 8c31d72742c620583c5af7cb55c733b388cccf247f17d6d727ee96abe6b78f62
Contents?: true
Size: 350 Bytes
Versions: 2
Compression:
Stored size: 350 Bytes
Contents
require "administrate/field/base" require 'rails' module Administrate module Field class Unixtime < Administrate::Field::Base def to_s return '-' unless data pretty end def pretty return unless data ::Time.at(data).to_s end class Engine < ::Rails::Engine; end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
administrate-field-unixtime-0.0.3 | lib/administrate/field/unixtime.rb |
administrate-field-unixtime-0.0.2 | lib/administrate/field/unixtime.rb |