Will_paginate not working

When I use will_paginate I get pure code in the layer I try to update starting with "try {". Any ideas what could be wrong without posting any code? What is the normal error when this happens, if any?

Pål Bergström wrote:

Btw, is this correct for use with ajax?

<%= will_paginate @documents, :renderer => 'RemoteLinkRenderer', :remote => { :method => :get, :update => "doctable"}, :prev_label => '<', :next_label => '>' %>

Pål Bergström wrote:

A bit confusing http://weblog.redlinesoftware.com/2008/1/30/willpaginate-and-remote-links

What RemoteLinkRenderer is right? One of them outputs raw code on the whole page and another will output in the right layer, so it's half way there.

Lake Denman wrote:

Pål Bergström wrote:

Pål Bergström wrote:

Btw, is this correct for use with ajax?

<%= will_paginate @documents, :renderer => 'RemoteLinkRenderer', :remote => { :method => :get, :update => "doctable"}, :prev_label => '<', :next_label => '>' %>

Are you rendering an update in your controller as well as your will_paginate method in the view? I'm assuming you've added the RemoteLinkRender somewhere in your code base as an extension to will paginate to use ajax?

Yes, I use an update in both places. Maybe that's the problem?

I use RemoteLinkRender. But not sure which one to use (view my previous post) :slight_smile:

I have both will_paginate (2.2.2, 2.1.0). And in my environment.rb I have require 'will_paginate'. Not sure which one of the installed am I using. How do I tell?