Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow max_per_page to be changed via config #4039

Closed
stephenlawrence opened this issue Jul 21, 2015 · 4 comments
Closed

Allow max_per_page to be changed via config #4039

stephenlawrence opened this issue Jul 21, 2015 · 4 comments
Assignees

Comments

@stephenlawrence
Copy link

As an admin, I want to be able to set the max_per_page value in the AA configuration so that I can limit the maximum number of items that will return for a single page in case a user tries to over-ride via per_page with a number I find to be too high.

@eshaiju
Copy link
Contributor

eshaiju commented Jul 28, 2015

@stephenlawrence
Copy link
Author

I am looking for max_per_page, not default_per_page. As far as I can tell, the max_per_page is hardcoded to 10,000. I would like it lower than that since users can over-ride via the &per_page parameter.

@timoschilling
Copy link
Member

max_per_page don't work in your case, max_per_page is only the fallback value.

What we need to support your case (which is a good point btw.) is:

  1. make max_per_page configurable
  2. ActiveAdmin::ResourceController::DataAccess#per_page need's to check the value of dynamic_per_page || configured_per_page against max_per_page and returns max_per_page if dynamic_per_page || configured_per_page is higher.

@timoschilling
Copy link
Member

closed by #4052

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants