# Paging error

**URL:** <https://www.ruby-forum.com/t/paging-error/174014>\
**Category:** Rails\
**Created:** [August 19, 2009, 12:26pm UTC](https://www.ruby-forum.com/t/paging-error/174014 "2009-08-19T12:26:23Z")\
**Posts on this page:** 1\
**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 19, 2009, 12:26pm UTC](https://www.ruby-forum.com/t/paging-error/174014/1 "2009-08-19T12:26:23Z")

</div>

i want to do paging with ajax

i am using link\_to\_remote file and than include partial  
for ex.  
items/index.html.erb  
\<%link\_to\_remote(‘items’,update=\>‘cont’,:url=\>{:action=\>:list})%\>  
list.html.erb this is also in items folder  
list.html.erb

\<%= render :partial =\> ‘list’%\>
  
items/\_list.html.erb  
in this all display record logic  
in controler  
def list  
@items = Item.paginate(:page =\> params[:page], :per\_page =\> 2)  
respond\_to do |format|  
format.html  
format.xml  
format.js {  
render :update do |page|  
page.replace\_html ‘mcont’, :partial =\> ‘list’  
end  
}  
end  
end

i can not redirect this way without link\_to\_remote this is possible  
if any idea about it please give me  
Thanks
