Pregunta

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>
¿Fue útil?

Solución

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'.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top