Is there any possible way to fix the url that Kaminari pagination generates?

后端 未结 1 1801
-上瘾入骨i
-上瘾入骨i 2020-12-18 06:09

I was implementing a chat system to my app, in which only the list of comments will be reloaded with ajax submit.

Kaminari pagination is used in t

相关标签:
1条回答
  • 2020-12-18 06:36

    This is a known issue with Kaminari. See: Issue #132, Issue #182.

    The current known workaround is to manually set params on the pagination helper, for example:

    paginate @comments, :params => { :controller => 'comments', :action => 'index', _: nil, _method: nil, authenticity_token: nil, utf8: nil}
    

    You'll have to adjust that code to fit your situation, and be sure to test that all other functionality works as expected when you're manually setting all the params.

    Since you're specifically experiencing an issue with timestamps on the URL you should comment on Issue 132 and post the details of your experience there. The more you participate in the github issues the more likely that you, the project users, and the maintainers will be able to find a better solution.

    0 讨论(0)
提交回复
热议问题