app/helpers/roroacms/prepcontent_helper.rb in roroacms-0.0.6.9 vs app/helpers/roroacms/prepcontent_helper.rb in roroacms-0.0.7

- old
+ new

@@ -1,28 +1,28 @@ -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 +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 \ No newline at end of file