Module: ActiveAdmin::ResourceController::Collection::Pagination
- Included in:
- ActiveAdmin::ResourceController::Collection
- Defined in:
- lib/active_admin/resource_controller/collection.rb
Instance Method Summary collapse
- #active_admin_collection ⇒ Object protected
- #paginate(chain) ⇒ Object protected
-
#setup_pagination_for_csv ⇒ Object
protected
Allow more records for csv files.
Instance Method Details
#active_admin_collection ⇒ Object (protected)
117 118 119 |
# File 'lib/active_admin/resource_controller/collection.rb', line 117 def active_admin_collection paginate(super) end |
#paginate(chain) ⇒ Object (protected)
126 127 128 |
# File 'lib/active_admin/resource_controller/collection.rb', line 126 def paginate(chain) chain.send(Kaminari.config.page_method_name, params[:page]).per(@per_page || active_admin_namespace.default_per_page) end |
#setup_pagination_for_csv ⇒ Object (protected)
Allow more records for csv files
122 123 124 |
# File 'lib/active_admin/resource_controller/collection.rb', line 122 def setup_pagination_for_csv @per_page = 10_000 if request.format == 'text/csv' end |