# Will\_paginate not working

**URL:** <https://www.ruby-forum.com/t/will-paginate-not-working/146093>\
**Category:** Rails\
**Created:** [August 17, 2008, 7:57pm UTC](https://www.ruby-forum.com/t/will-paginate-not-working/146093 "2008-08-17T19:57:56Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [August 17, 2008, 7:57pm UTC](https://www.ruby-forum.com/t/will-paginate-not-working/146093/1 "2008-08-17T19:57:56Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [August 17, 2008, 8:01pm UTC](https://www.ruby-forum.com/t/will-paginate-not-working/146093/2 "2008-08-17T20:01:02Z")

</div>

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 =\> ‘\>’ %\>

---

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [August 17, 2008, 8:37pm UTC](https://www.ruby-forum.com/t/will-paginate-not-working/146093/3 "2008-08-17T20:37:04Z")

</div>

PÃ¥l BergstrÃ¶m wrote:

A bit confusing  
[http://weblog.redlinesoftware.com/2008/1/30/willpaginate-and-remote-links](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.

---

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [August 17, 2008, 8:47pm UTC](https://www.ruby-forum.com/t/will-paginate-not-working/146093/4 "2008-08-17T20:47:28Z")

</div>

Lake D. 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) 🙂

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?

---

<div class="post-metadata">

**Author:** ![paulbutcher](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/a5b964/32.png) [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Post date:** [August 17, 2008, 8:40pm UTC](https://www.ruby-forum.com/t/will-paginate-not-working/146093/5 "2008-08-17T20:40:09Z")

</div>

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?
