Will_paginate not working with the ajax

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