Sha256: 1b173ea515030c694f0fee6498caae0d441606cd696dafe3f33c3b9972a44ef0
Contents?: true
Size: 1.26 KB
Versions: 16
Compression:
Stored size: 1.26 KB
Contents
# Define presentation-specific methods here. Helpers are accessed through # `helpers` (aka `h`). # # This class is used to contain some common presenter functions #------------------------------------------------------------------------------ class ForumCommonPresenter < BasePresenter presents :model #------------------------------------------------------------------------------ # Admin presenter methods #------------------------------------------------------------------------------ def label_published model.published? ? h.colored_label('Published', :success) : h.colored_label('Draft') end # # #------------------------------------------------------------------------------ # # Front-end presenter methods # # # Run content through a standard Textile/Liquid renderer # #------------------------------------------------------------------------------ # def render_content(arguments = {}) # doc = RedCloth.new(Liquid::Template.parse(model.content).render(arguments, :filters => [LiquidFilters], # :registers => {:controller => controller, :view => self, :account_site_assets => '/site_assets', :current_user => current_user})) # #doc.hard_breaks = false # # return doc.to_html.html_safe # end end
Version data entries
16 entries across 16 versions & 1 rubygems