Sha256: d94ec418b9e7ccd143f4db5a56d55876baada6dd738372480ea9f3602f3ec2e6

Contents?: true

Size: 365 Bytes

Versions: 4

Compression:

Stored size: 365 Bytes

Contents

require 'redcarpet'

module ApiTaster
  module ApplicationHelper
    def markdown(text)
      markdown_renderer ||= Redcarpet::Markdown.new(Redcarpet::Render::HTML)
      markdown_renderer.render(text).html_safe
    end

    def headers_js_callback
      render partial: "api_taster/routes/headers.js", locals: {headers: ApiTaster.global_headers}
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
api_taster-0.8.4 app/helpers/api_taster/application_helper.rb
api_taster-0.8.3 app/helpers/api_taster/application_helper.rb
api_taster-0.8.2 app/helpers/api_taster/application_helper.rb
api_taster-0.8.1 app/helpers/api_taster/application_helper.rb