Hello everyone, I am having an issue with the will_paginate gem, i have
recently added AJAX and JS to refresh the div with paginate without
refreshing the page.
I followed online examples and successfully got it working, however the
"previous" button and the first page are not shown as links, and can not
be clicked.
All other pages are in working order, and refreshes fine except the
first.
Could you provide rendered HTML for the Previous button? My idea would be it is disabled somehow and you got to alter that part of HTML too with your code in index.js.erb; i.e. it is rendered as non-link for the first (default) rendering of the pagination, and that element has no idea you’re already “at page 2”. Better yet provide what the HTML of Prev looks like when you are at page number 1, and page number 2 (without Ajax functionality). That should give you and me insight in what has to change for that Prev link to become active.