Class: ExtraExtra::ReleaseNotesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/extra_extra/release_notes_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject


9
10
11
12
13
14
15
16
17
# File 'app/controllers/extra_extra/release_notes_controller.rb', line 9

def index
  file_content = File.read("#{Rails.root}/RELEASE_NOTES.md")
  markdown_renderer = Redcarpet::Markdown.new(ExtraExtra::SemanticHtmlRenderer.new(ExtraExtra.renderer_options),
                                              autolink: true, 
                                              no_intra_emphasis: true,
                                              space_after_headers: true, 
                                              fenced_code_blocks: true)
  @content = markdown_renderer.render(file_content)
end