Sha256: b2293606d705a3c76ef318094513cf21342910402b11c746ae13c84656c1ecd9

Contents?: true

Size: 796 Bytes

Versions: 7

Compression:

Stored size: 796 Bytes

Contents

module ReportsKit
  module Helper
    include ReportsKit::NormalizedParams

    def render_report(report_params, context_params: {}, actions: %w(export_csv export_xls), js_report_class: 'Report', &block)
      report_params = { key: report_params } if report_params.is_a?(String)
      params.merge!(context_params: context_params, report_params: report_params)
      properties = Reports::Properties.generate(self)
      builder = ReportBuilder.new(
        report_params: report_params,
        context_params: context_params,
        actions: actions,
        js_report_class: js_report_class,
        properties: properties,
        view_context: self,
        block: block
      )
      capture do
        capture(builder, &block) if block
        builder.render
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
reports_kit-0.7.1 lib/reports_kit/helper.rb
reports_kit-0.7.0 lib/reports_kit/helper.rb
reports_kit-0.5.0 lib/reports_kit/helper.rb
reports_kit-0.4.1 lib/reports_kit/helper.rb
reports_kit-0.4.0 lib/reports_kit/helper.rb
reports_kit-0.3.3 lib/reports_kit/helper.rb
reports_kit-0.3.2 lib/reports_kit/helper.rb