On all the pages of my app, I want a link to the JSON version of current page. Any neat tricks to do this? Where it got complicated was when additional '&' parameters were included in the URL.
So the urls would be transposed as:
'/users' => '/users.json'
'/users?page=1&per_page=5' => '/users.json?page=1&per_page=5'