Sha256: 22528c5defcf901cd343835dac34073dc5b5ad4a525b45b56e5bfdf5b548d2cd
Contents?: true
Size: 728 Bytes
Versions: 8
Compression:
Stored size: 728 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. if it's a date/time, make it nicer. If it has a _presentation, show that instead o = object.send(attribute) o = o.to_s + " (" + distance_of_time_in_words_to_now(o) + " ago )" if o.is_a?(Time) o = o._presentation if o.respond_to?(:_presentation) o end def info_edit(object, attribute) o = object.send(attribute) o = o.to_s + " (" + distance_of_time_in_words_to_now(o) + " ago )" if o.is_a?(Time) o = o._presentation if o.respond_to?(:_presentation) o end def info_update(object, attribute) # do absolutely nothing end
Version data entries
8 entries across 8 versions & 1 rubygems