Method: QueryReport::Helper#reporter
- Defined in:
- lib/query_report/helper.rb
#reporter(query, options = {}, &block) ⇒ Object
Generates the reports Params: query - The base query that the reporter with start with [filters will be applied on it] options - Options for the reports
:custom_view - by default false, if set to true then the reporter will look for the file to render
:skip_rendering - by default false, if set to true then the reporter will not render any thing, you will have to implement the rendering
19 20 21 22 23 24 25 |
# File 'lib/query_report/helper.rb', line 19 def reporter(query, ={}, &block) @report ||= QueryReport::Report.new(params, view_context, ) @report.query = query @report.instance_eval &block render_report() unless [:skip_rendering] @report end |