Kaminari Gem 和 Rails 的无限滚动太阳黑子 3.1
我正在尝试运行这个无限滚动,但对我来说效果不佳。
https://github.com/amatsuda/ kaminari/wiki/How-To:-Create-Infinite-Scrolling-with-jQuery
我正在使用 太阳黑子与 kaminari gem 对结果进行分页。
但是当我尝试使用本教程创建无限滚动时。我发现当滚动到达向下页面时,多次重复第二页的结果,但不显示第 3,4,5 页和下一页的结果。
重复第二页结果为多次,因为控制器中每页都有结果,例如:如果控制器中有索引操作:在
paginate :page => params[:page], :per_page => 8
相同的第二页上重复 8 次,得到相同的结果。
I am trying run this infinite scroll but for me not working fine.
https://github.com/amatsuda/kaminari/wiki/How-To:-Create-Infinite-Scrolling-with-jQuery
I am using sunspot with kaminari gem that paginate fine the results.
But when I trying create the infinite scroll with this tutorial. I get that when the scroll arrive the page down, repeat the result of the second page many times, but the results for the page 3,4,5 and the next page dont are showed.
repeats the second page results as many times as you have results per page in your controller, for example: if you have in your controller index action:
paginate :page => params[:page], :per_page => 8
Repeat 8 times the same second page with the same results.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论