Rails -v 3.2.3
im using kaminari to do pagination but i keep getting a NO METHOD ERROR, undefined method 'current_page' for nil:NilClass
in views/layouts/application.html.erb where line #7 raised:
<%= paginate @links, :remote => true %>
is this happening because i have it on the application view instead of my link submission view? does it matter where you place the paginate link?
in /controllers/links_controllers.rb (in a method called submissions)
@links = Link.page(params[:page]).per(20)
I figured it out… basically I had to move my
<%= paginate @links %>code to my submissions.html.erb page (which is a part of my links views) I then ranbundleto make surewill_paginatewas gone from my gemsfile and voilà, it worked.