开发者

Ruby On Rails: Fetching records

I'm looking for a tutorial or a piece of code that can leads me to create a page where we can find only 10 data rows开发者_Python百科 per page and navigating with Ajax previous/next arrows and also page number (i.e.: < 1 2 3 ... 10 > ).

Thank you very much.


A good place to start is Mislav's will-paginate plugin. The Readme at that link should explain how to use it.

Edited:

There's also a screencast on RailsCasts about Ajax pagination. I haven't watched it, but his stuff is usually really high-quality and easy to follow.


it's not ajax but maybe it's useful for you... when you use haml and haml_scaffolding in rails it's authomatic the pagination using this kind of sacffolding

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜