Module: Downr::Helpers

Defined in:
lib/downr/action_view/helpers.rb

Overview

Helper namespace for views

Instance Method Summary collapse

Instance Method Details

#render_markdown(markdown) ⇒ String

View helper to render a variable containing markdown in the view, calls html_safe on it!

Parameters:

  • markdown (String)

    the markdown to render

Returns:

  • (String)

    html safe string



12
13
14
# File 'lib/downr/action_view/helpers.rb', line 12

def render_markdown(markdown)
  Downr::Markdown.render(markdown).html_safe
end