I am using will_paginate for paginating my results. Most of my site is AJAXified. All the records in the view can be edited/deleted in place. These records are paginated. I would like to know if there is any way to reset the pagination on AJAX destroy.
For example, say i have 20 records, with 5 records shown per page. If the user deletes a record, i would want the pagination links to reset accordingly. Also, i would have to pull in the next record onto the current page and display it in place of the deleted record. I just wanted to know if there was some gem/plugin available that could do the same. If not i would have to make one myself.
Is there any other alternative to the design approach that i am using? Perhaps something on the lines of Twitter/Buzz/Tumblr pagination? Or is there something you have come across which is better/cooler way of solving this issue?