You need to include the will_paginate
method for the data type Array
.
To do so, include the line
require 'will_paginate/array'
at the top of your controller, or in the ApplicationController
if you need pagination in all of your controllers.