Sha256: 7026a7281e46342253b6a872e7822e2f7fd1d585ea8a5ac1818023abdb87503d
Contents?: true
Size: 560 Bytes
Versions: 1
Compression:
Stored size: 560 Bytes
Contents
module Admin::Resources::DataTypes::DatetimeHelper def table_datetime_field(attribute, item) if field = item.send(attribute) I18n.localize(field, :format => item.class.typus_date_format(attribute)) end end alias :table_date_field :table_datetime_field alias :table_time_field :table_datetime_field alias :table_timestamp_field :table_datetime_field def display_datetime(item, attribute) I18n.l(item.send(attribute), :format => @resource.typus_date_format(attribute)) end alias_method :display_date, :display_datetime end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
typus-3.1.0.rc9 | app/helpers/admin/resources/data_types/datetime_helper.rb |