9.3.3 Pagination

Our original user doesn’t suffer from loneliness any more, but now we
have the opposite problem: our user has too many companions, and they
all appear on the same page. Right now there are a hundred, which is
already a reasonably large number, and on a real site it could be
thousands. The solution is to paginate the users, so that (for example)
only 30 show up on a page at any one time.

There are several pagination methods in Rails; we’ll use one of the
simplest and most robust, called will_paginate. To use it, we need to
include both the will_paginate gem and bootstrap-will_paginate, which
configures will_paginate to use Bootstrap’s pagination styles.