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

Setting per_page globally #62

Closed
iain opened this issue Mar 19, 2011 · 2 comments
Closed

Setting per_page globally #62

iain opened this issue Mar 19, 2011 · 2 comments

Comments

@iain
Copy link

iain commented Mar 19, 2011

I think there should be a way to set the default_per_page nicer than now. The constant DEFAULT_PER_PAGE can be set, but in a Rails application, there is no way to set it before the gem loads, so you're always overriding it, resulting in a warning.

@amatsuda
Copy link
Member

Hi, thanks for the suggestion!

This was done in these commits amatsuda/kaminari@7473663...91d6628 and included in the newest 0.12.0 gem.
Can you bundle '>= 0.12.0' gem and try the following steps?

  1. generate the configuration file
% rails g kaminari:config
  1. edit "default_per_page" value in config/initializers/kaminari_config.rb

Hoping you like it!

@iain
Copy link
Author

iain commented Apr 22, 2011

Works like a charm! Thanks!

@iain iain closed this as completed Apr 22, 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

No branches or pull requests

2 participants