pagination for posts_controller