Sha256: 31cf771fccd9e734b279090f01766b446e75f9b3e4e3dad293f91750031f8770
Contents?: true
Size: 501 Bytes
Versions: 17
Compression:
Stored size: 501 Bytes
Contents
# -*- encoding : utf-8 -*- # not needed here, since this is only used in the views InlineForms::SPECIAL_COLUMN_TYPES[:info]=:string def info_show(object, attribute) # show the attribute and if it's a date/time, make it nicer. o = object[attribute] o = o.to_s + " (" + distance_of_time_in_words_to_now(o) + " ago )" if o.is_a?(Time) o end def info_edit(object, attribute) # just show the attribute. object[attribute] end def info_update(object, attribute) # do absolutely nothing end
Version data entries
17 entries across 17 versions & 1 rubygems