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

Display correct pagination figures when @per_page is set #751

Merged

Conversation

DMajrekar
Copy link
Contributor

Setting a custom @per_page through a before_filter fetches the correct number of records but the text in the pagination is incorrect.

Using collection.size rather than active_admin_application.default_per_page yields the correct text.

@pcreux
Copy link
Contributor

pcreux commented Nov 21, 2011

This is great. We should add this as an option to the index method.

ActiveAdmin.register Category do
  index :per_page => 10 do
    # ...
  end
end

pcreux added a commit that referenced this pull request Nov 21, 2011
---

Setting a custom @per_page through a before_filter fetches the correct number of records but the text in the pagination is incorrect. 

Using collection.size rather than active_admin_application.default_per_page yields the correct text.
@pcreux pcreux merged commit 750f4ca into activeadmin:master Nov 21, 2011
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

Successfully merging this pull request may close these issues.

2 participants