Rails 4 pagination with dynamic data

冷暖自知 提交于 2019-12-23 09:25:56

问题


Hi I have a rails4 app using pagination with the will_paginate gem.

Is there a way to handle pagination with objects created very often? If you call the first page and right after that the page 2, considering new objects are created in the meantime, it is going to mess data (the offset in the sql request is for example going to call almost the same data as the first page).

Is there a way to use pagination with rapidly changing dynamic data?

Thx for your suggestions


回答1:


Also, you could use the cursor gem



来源:https://stackoverflow.com/questions/23973931/rails-4-pagination-with-dynamic-data

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!