Module: ApplicationHelper

Defined in:
app/helpers/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#icon(key, options = {}) ⇒ Object


2
3
4
5
# File 'app/helpers/application_helper.rb', line 2

def icon(key, options = {})
  opts = options.merge(:class => "fa fa-#{key} #{options[:class]}".strip)
  (:i, "", opts).html_safe
end

#markdown(text) ⇒ Object


7
8
9
10
11
# File 'app/helpers/application_helper.rb', line 7

def markdown(text)
  renderer = Redcarpet::Markdown.new(TargetBlankRenderer,
    :autolink => true, :space_after_headers => true)
  renderer.render(text).html_safe
end