Project

General

Profile

« Previous | Next » 

Revision 63fbccbf

Added by Martin Bacovsky over 5 years ago

Fixes #25099 - Add macros for easier report definition

Add rows to a report with
<%- report_row(
'Column header 1': 'Value 1',
'Column header 2': `Value 2`,
) ->
and render the report with
<
= report_render -%>

Each row of the report needs to have the same columns.
report_render produces properly quoted valid CSV.
Values are converted to a String using to_s.
Enumerable values are comma separated and serialized.

Experimental render to YAML is included (report_render(format: :yaml)
Enumerable values are kept structured in this format.

  • added
  • modified
  • copied
  • renamed
  • deleted