Module: QueryReport::PaginateModule
- Included in:
- Report
- Defined in:
- lib/query_report/paginate.rb
Instance Method Summary collapse
Instance Method Details
#apply_pagination(query, params) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/query_report/paginate.rb', line 8 def apply_pagination(query, params) if paginate? page_method_name = Kaminari.config.page_method_name query.send(page_method_name, params[:page]).per([:per_page] || Kaminari.config.default_per_page) else query end end |