Question

In my home controller I have

@list = Igraci.page(params[:page]).per(1)

In the index view

<%= paginate @list %>

and got this error:

undefined method 'page' for #<Class:0x235f256>
Was it helpful?

Solution

Make sure you have gem 'kaminari' in your Gemfile, that you run bundle and restarted the server.

Additionally, someone had the same issue as you, and their solution was to require kaminari in config/application.rb just before require 'rails/all'.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top