This could be a pagination question, but I’m not sure how to title it.
I have a list of numbers = [1,2,3,4,5,6,7,8,9,10,11,12....]
I’d like to display the list at first as [1,2,3]
Then with a click of a button it will give the next 3 and so on
obivously the list doesn’t have to be numbers it could users like in twitter, statuses in facebook, email headers, pictures and so on but the concept remains the same
How would I implement this?
Use the gem kaminari. You can do something like the following:
And paginate generic objects. There is a paragraph about that in the README.