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

Already on GitHub? Sign in to your account

Display correct pagination figures when @per_page is set #751

Merged
merged 1 commit into from Nov 21, 2011

Conversation

Projects
None yet
2 participants
Contributor

DMajrekar commented Nov 15, 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.

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

Merge pull request #751 from DMajrekar/active_admin
---

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