DEV Community


Discussion on: Pagination in Rails

thorstenhirsch profile image
Thorsten Hirsch

This kind of pagination lead to a dead-end for my use case, because my users wanted sort and search the data. Sure there might be a hacky way to forward the search term and the sort key from client to server and let the server do the sorting & searching before the pagination, but with all the requests and replies it's not the best user experience. So my advise is: unless you have thousands of records you should send all data to the browser and do pagination there with a JS library.

rwparrish profile image
rwparrish Author

I actually thought about sorting and searching while I was implementing this. That is something I would like to try implementing in a future project. Thanks for the input.