will_paginate发现,如果我是最后一页 [英] will_paginate find out if I'm on the last page
本文介绍了will_paginate发现,如果我是最后一页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我试图用将与阿贾克斯分页,但我不显示 will_paginate
按钮......而不是我用的是看更多
按钮,这使得一个Ajax请求,并追加结果页面。
我想要做的是禁用该看到更多的
按钮,如果我打的记录的最后一页!
任何想法如何知道当前页面是最后一页??
I'm trying to use will paginate with ajax, but I don't show the will_paginate
buttons... instead I use a see more
button, that makes an Ajax request and append the results to the page.
what I'm trying to do is disable this see more
button if I hit the last page of records!!
Any idea how to know that the current page is the last page??
推荐答案
@ collection.total_pages == @ collection.current_page
@collection.total_pages == @collection.current_page
这篇关于will_paginate发现,如果我是最后一页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文