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

paginate params option ignored #919

Closed
chao-mu opened this issue Oct 17, 2017 · 6 comments
Closed

paginate params option ignored #919

chao-mu opened this issue Oct 17, 2017 · 6 comments
Assignees
Milestone

Comments

@chao-mu
Copy link

chao-mu commented Oct 17, 2017

(I am on kaminari-1.1.0, and rails 5.1.4.)

I am using kaminari in an engine and am noticing that the params option is entirely ignored.

<%= paginate comments, params: {controller: "blurp", action: "whyyyyy"} %>

No error, no updated path, nothing - it uses the path of the controller/action rendering it. Same if I provide a real controller/action.

This occurs in a partial rendered by another partial - in case that matters.

My installation steps were to add to s.add_dependency "kaminari" to my gemspec.

Thank you for your contribution to the community!

@chao-mu
Copy link
Author

chao-mu commented Oct 17, 2017

It doesn't seem to be ignoring it completely, just the controller and action. I passed a "params" inside "params" and that showed up in the query parameters of the URL. I still need to adjust the controller/action though.

@yuki24 yuki24 self-assigned this Oct 17, 2017
@yuki24 yuki24 added this to the 1.2.0 milestone Oct 17, 2017
@yuki24
Copy link
Member

yuki24 commented Oct 17, 2017

Thanks for reporting. It seems like that was broken since 686e27f. I'll look into it.

@chao-mu
Copy link
Author

chao-mu commented Oct 17, 2017

Thank you!

Is there a work around in the meantime?

@yuki24 yuki24 closed this as completed in e32c61c Oct 17, 2017
@yuki24
Copy link
Member

yuki24 commented Oct 17, 2017

@chao-mu I just pushed a fix. If you don't mind could you try using the master branch directly from GitHub?

gem 'kaminari', git: 'https://github.com/kaminari/kaminari', ref: 'e32c61c'

@chao-mu
Copy link
Author

chao-mu commented Oct 17, 2017

Works! Thank you!

@yuki24
Copy link
Member

yuki24 commented Oct 22, 2017

Version 1.1.1 is out with fixes to this issue.

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

No branches or pull requests

2 participants