Well, I don't know exactly why, but If I try now, it works without this line. However I read this:
https://github.com/mislav/will_paginate/issues/163
Also, I had an error before.