Sha256: 82b46006ee6b74f0db19595075426159b5565860059386acfc1b2b400d8033a6
Contents?: true
Size: 439 Bytes
Versions: 10
Compression:
Stored size: 439 Bytes
Contents
module Blog module Models class Comment < Default many_to_one :entry, :class => Blog::Models::Entry before_save do set_with_params(:updated_on => Time.now) if columns.include? :updated_on end def time updated_on.strftime('%I:%M %p on %b %d, %Y') end def attribution name.nil? || name.empty? ? 'anonymous coward' : name end end end end
Version data entries
10 entries across 10 versions & 4 rubygems