def published_at 5 # 'h' exposes Rails helpers w/i your decorator 6 # 'model' exposes the actual object you're decorating 7 h.l(model.published_at, :format => :murican_time) 8 end 9 10 def total_viewers 11 "#{model.viewers.size} People Have Viewed This Post" 12 end 13 14 def description_html 15 MARKDOWN.render(model.description).html_safe 16 end 17 end