# Will\_paginate not working with the ajax

**URL:** <https://www.ruby-forum.com/t/will-paginate-not-working-with-the-ajax/181933>\
**Category:** Rails\
**Created:** [January 20, 2010, 11:52am UTC](https://www.ruby-forum.com/t/will-paginate-not-working-with-the-ajax/181933 "2010-01-20T11:52:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gandhi-tush](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Post date:** [January 20, 2010, 11:52am UTC](https://www.ruby-forum.com/t/will-paginate-not-working-with-the-ajax/181933/1 "2010-01-20T11:52:43Z")

</div>

Hi,  
I am using “will\_paginate” for pagination purpose.  
I have a partial with name “my\_friends”, I have a pagination of 25 per  
page.  
I have added “\<%= will\_paginate @user\_friend} %\>” in my partial.  
It is working fine. I have a functionality to delete the friend.  
So I have usd “link\_to\_remote” call to delete the friend and I am  
updating that partial with all required parameters. It is also working  
fine.  
But whenever after deleting any friend I am going to next page it is  
going to “friend delete” action and gives the error as the friends is  
already deleted.  
So I am not able to understand why the pagination url has changed to  
delete action.  
Can anyone help me out to solve this problem?

Thanks,  
Tushar
