Module: NippoCore::ReportDecorator

Defined in:
app/decorators/nippo_core/report_decorator.rb

Instance Method Summary collapse

Instance Method Details

#markdowned_bodyObject



7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/decorators/nippo_core/report_decorator.rb', line 7

def markdowned_body
  options = {
    autolink: true,
    space_after_headers: true,
    fenced_code_blocks: true,
    tables: true,
    hard_wrap: true,
    strikethrough: true,
    filter_html: true
  }
  markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, options)
  markdown.render(body)
end

#titleObject



3
4
5
# File 'app/decorators/nippo_core/report_decorator.rb', line 3

def title
  "#{reported_at} #{user.nickname}"
end