Rails "Download more ..." instead of pagination

I have a list of items, and so far I have used will_paginate, but I would like to have something like "load more ..." at the bottom of the list. Is there an easy way to accomplish this with will_paginateor do I need to resort to some other method here?

From what I know, this is the best route, because then I do not need a SQL record counter. And indeed, it doesn’t matter if there is something like 9,847 pages, in any case no one will require entries outside the first pages.

+3
source share
2 answers

, Twitter Brightkite " " ( JavaScript). - - rails. , , will_paginate. , - :

# where 10 is the number of records per page
Record.find(:all, :conditions => {:offset => params[:page] * 10, :limit => 10})

AJAX, , , .

+5

screencast endless page .

+4

Source: https://habr.com/ru/post/1738133/


All Articles