pushState with Rails ajax
I have an index action page showing a list of items with are paginated with Kaminari and I have added ajax functionality to them and now am trying to get the URL to fit in by using pushState. My question is how do I get the URL to pass to the pushState method when my pagination links are done via: <%= paginate @coasters, remote: true %> and the javascript view is as follows: $('.grid').html('<%= escape_javascript render(@coasters) %>'); $('.pagination').html('<%= escape_javascript(paginate(@coasters, remote: true).to_s) %>'); I need to somehow get the URL to pass as the 3rd argument of