I have a standard CRUD forum with posts and comments.
Currently the index page displays all posts, I would like to have it display the last 10 posts with links to the next page of 10 etc. like at the bottom of a google search. like this:
<< 1 2 3 4 5 6 >>
It seems like something fairly common, how do people usually approach this? Is there a common git, or do people usually just code it by hand?
You can use will_paginate gem.
Here’s a railscasts to help you
EDIT:
There is another gem for pagination : Kaminari (railscast)