Module: Noventius::RowsHelper

Defined in:
app/helpers/noventius/rows_helper.rb

Instance Method Summary collapse

Instance Method Details

#data_for_row(row, report) ⇒ Object



11
12
13
14
15
16
17
# File 'app/helpers/noventius/rows_helper.rb', line 11

def data_for_row(row, report)
  return unless report.enable_nested?

  { nested: { url: nested_report_path(name: report.class.name),
              row: row,
              filters: { q: report.filter_params } } }
end

#row_tag(row, report, &block) ⇒ Object



5
6
7
8
9
# File 'app/helpers/noventius/rows_helper.rb', line 5

def row_tag(row, report, &block)
  options = { data: data_for_row(row, report) }

  (:tr, options, &block)
end