undefined method `paginate' for #<Array:0x0000000764d1b8> undefined method `paginate' for #<Array:0x0000000764d1b8> ruby-on-rails ruby-on-rails

undefined method `paginate' for #<Array:0x0000000764d1b8>


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.