Sha256: 5108f37810007eb912a6a566a2fa8a0589d3edc50162049dfe6753aca0d3ca83

Contents?: true

Size: 679 Bytes

Versions: 25

Compression:

Stored size: 679 Bytes

Contents

module Roroacms  
  module PrepcontentHelper

    MARKDOWN = Redcarpet::Markdown.new(Redcarpet::Render::HTML, extensions = {})


    # prepares the content for visual display by replacing shortcodes with the html equivalent
    # Params:
    # +c+:: is optional, but if you choose to pass it data this has to be a singular post object.
    # If you don't pass it any content then it will take the globalized content for the page

    def prep_content(c = '')
      c = 
        if c == ''
          @content.post_content
        elsif c.is_a?(Object)
          c.post_content
        else
          c = c
        end

      MARKDOWN.render(c).html_safe
      

    end

  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
roroacms-1.0.0 app/helpers/roroacms/prepcontent_helper.rb
roroacms-0.0.8.6.7 app/helpers/roroacms/prepcontent_helper.rb
roroacms-0.0.8.6.6 app/helpers/roroacms/prepcontent_helper.rb
roroacms-0.0.8.6.5 app/helpers/roroacms/prepcontent_helper.rb
roroacms-0.0.8.6.4 app/helpers/roroacms/prepcontent_helper.rb
roroacms-0.0.8.6.3 app/helpers/roroacms/prepcontent_helper.rb
roroacms-0.0.8.6.2 app/helpers/roroacms/prepcontent_helper.rb
roroacms-0.0.8.6.1 app/helpers/roroacms/prepcontent_helper.rb
roroacms-0.0.8.6 app/helpers/roroacms/prepcontent_helper.rb
roroacms-0.0.8.5 app/helpers/roroacms/prepcontent_helper.rb
roroacms-0.0.8.4 app/helpers/roroacms/prepcontent_helper.rb
roroacms-0.0.8.3 app/helpers/roroacms/prepcontent_helper.rb
roroacms-0.0.8.2 app/helpers/roroacms/prepcontent_helper.rb
roroacms-0.0.8.1 app/helpers/roroacms/prepcontent_helper.rb
roroacms-0.0.8 app/helpers/roroacms/prepcontent_helper.rb
roroacms-0.0.7.10 app/helpers/roroacms/prepcontent_helper.rb
roroacms-0.0.7.8 app/helpers/roroacms/prepcontent_helper.rb
roroacms-0.0.7.7 app/helpers/roroacms/prepcontent_helper.rb
roroacms-0.0.7.6 app/helpers/roroacms/prepcontent_helper.rb
roroacms-0.0.7.5 app/helpers/roroacms/prepcontent_helper.rb