# Ajax with will\_paginate problem

**URL:** <https://www.ruby-forum.com/t/ajax-with-will-paginate-problem/173694>\
**Category:** Rails\
**Created:** [August 13, 2009, 1:03pm UTC](https://www.ruby-forum.com/t/ajax-with-will-paginate-problem/173694 "2009-08-13T13:03:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wap](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/d9b06d/32.png) [@wap](https://www.ruby-forum.com/u/wap)\
**Post date:** [August 13, 2009, 1:03pm UTC](https://www.ruby-forum.com/t/ajax-with-will-paginate-problem/173694/1 "2009-08-13T13:03:01Z")

</div>

i can use \<%= link\_to\_remote(“MEMBER LIST”,:update =\> “mcont”, :url =\>  
{:controller =\> :users, :action =\> :list }) %\> this for user listing and  
then it display record i want to do paging on this list file but it is  
display one page when i click on second page this will no go to second  
my controller  
def list  
#@images = Image.paginate :page =\> params[:page], :per\_page =\> 3  
@users = User.paginate :page =\> params[:page], :per\_page =\> 3  
respond\_to do |format|  
format.html # index.html.erb  
format.xml { render :xml =\> @users }  
end  
end

in list.html.erb  
\<%= will\_paginate @users%\>

---

<div class="post-metadata">

**Author:** ![wap](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/d9b06d/32.png) [@wap](https://www.ruby-forum.com/u/wap)\
**Post date:** [August 13, 2009, 1:39pm UTC](https://www.ruby-forum.com/t/ajax-with-will-paginate-problem/173694/2 "2009-08-13T13:39:37Z")

</div>

On Thu, Aug 13, 2009 at 4:03 AM, Wap A.  
\<removed\_email\_address@domain.invalid

> wrote:

> ```
> format.html # index.html.erb
> format.xml { render :xml => @users }
> 
> ```
> 
> end  
> end
> 
> in list.html.erb  
> \<%= will\_paginate @users%\>

Hi, have you taken a look at the following screencast:

> **[\#174 Pagination with AJAX - RailsCasts](http://railscasts.com/episodes/174-pagination-with-ajax)**
>
> Short Ruby on Rails screencasts containing tips, tricks and tutorials. Great for both novice and experienced web developers.

-Conrad

---

<div class="post-metadata">

**Author:** ![wap](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/d9b06d/32.png) [@wap](https://www.ruby-forum.com/u/wap)\
**Post date:** [August 13, 2009, 2:23pm UTC](https://www.ruby-forum.com/t/ajax-with-will-paginate-problem/173694/3 "2009-08-13T14:23:51Z")

</div>

thanks guys i can solve my problem
