Trying to reproduce will_paginate #251
Fixed merge