In the update action of my preferences controller in my Rails app, if there are any errors in the validation/save etc there's a call to:
format.html { render :edit }
Nothing too unusual there - however, when this code is hit, the address in the browser changes and loses the /edit in the URL.
For example:
To start with, my browser shows I am on the page at following address: http://localhost:3000/preferences/1/edit
However, once the errors are detected and the render is called the address in the is changed to http://localhost:3000/preferences/1
I can't say I've ever noticed this behaviour before - but Is there a way to force the /edit to stay on the end of the URL? Without the /edit it is effectively showing the URL of the show page (and I don't have a template for that!)
Many thanks, Ash