I finally came to ask this question since I found no answer and it kept bothering me. What’s the reason behind this behavior ? Is it REST-thingy-driven 🙂 ?
I found this “workaround” but no explanation : How to make a render :edit call show the /edit in the address bar
Thanks
EDIT
My question was not that well written, sorry. Why the default Rails behavior is not to redirect to the edit template? That would feel more logical, to me at least 🙂
renderdoesn’t redirect, so there’s no reason the URL bar address would change.The default
updatemethod looks like this:The URL is
/posts/1, which is what displays in the URL bar. If update_attributes fails, e.g., a validation error, it renders the"edit"template, with no redirect.