Sha256: 8894927f00c688d2aa40eaa8a7ad96b4506948fcaa639918902c07146a67693d
Contents?: true
Size: 801 Bytes
Versions: 9
Compression:
Stored size: 801 Bytes
Contents
module Admin::PartTypesHelper def updated_stamp(model) unless model.new_record? updated_by = (model.updated_by || model.created_by) if model.respond_to?(:updated_by) login = updated_by ? updated_by.login : nil time = (model.updated_at || model.created_at) # promoted_at = model.draft_promoted_at if model.respond_to?(:draft_promoted_at) html = %{<p style="clear: left"><small>} if login or time html << 'Last updated ' html << %{by #{login} } if login html << %{at #{ timestamp(time) }} if time html << '. ' end # if promoted_at # html << %{Last promoted at #{ timestamp(promoted_at) }.} # end html << %{</small></p>} html else %{<p class="clear"> </p>} end end end
Version data entries
9 entries across 9 versions & 1 rubygems