Skip to content
A.K.M. Ashrafuzzaman edited this page Jun 3, 2014 · 1 revision

Report options

Override per page

By default it reads from the kaminari, if per_page is passed to reporter then it uses that for the particular report.

reporter(Invoice.scoped, per_page: 10) do
  column :title
  column :invoiced_on, as: "Invoiced on"
end

Render report in part of the page

By default query report renders using its own list page. If you want to render report as a pert of page then you can use custom_view option.

def index
  reporter(Invoice.scoped, custom_view: true) do
    column :title
    column :invoiced_on, as: "Invoiced on"
  end
end

In the view file index.html.erb,

....
<%= render_query_report %>
....