-
Notifications
You must be signed in to change notification settings - Fork 412
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
Paginate two or more collections in one action #20
Comments
Nope. You can do it right now by doing: @pagy, @records = pagy(@mycollection, page: param[:custom_param_name]) |
and BTW... The proper way to change the param name (but for all instances) would be overriding |
Yes, I also thought/wrote |
Absolutely not: @pagy, @records = pagy(@mycollection) # uses params[:page]
@custom_pagy1, @custom_records = pagy(@mycollection1, page: param[:custom_param_name1])
@custom_pagy2, @custom_records2 = pagy(@mycollection2, page: param[:custom_param_name2]) |
|
True! And wrong! I have to fix that! |
If I understand it correctly, currently the only way to rename the
page
param, is to redefinepagy_get_params
.Will paginate for example allows to do something like this:
Which in turn easily enables to have more than one collection paginated per action.
@ddnexus, would something like this be a feature that you are willing to add (yourself or via a PR) or is this outside the scope of Pagy?
The text was updated successfully, but these errors were encountered: