Sha256: 5c5ad0c993ddcdf4786fea32b69d4df5a2a9262d3c6215591bde03af933498b3
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 EventCommonPresenter < 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