RoR: How to prevent Url change after erronous edit?
Posted
by CharlesS
on Stack Overflow
See other posts from Stack Overflow
or by CharlesS
Published on 2010-05-25T08:53:03Z
Indexed on
2010/05/25
9:01 UTC
Read the original article
Hit count: 169
ruby-on-rails
In a standard generated scaffold project, when you are on an edit page, the URL looks like;
/something/3/edit
However, when the page doesn't validate, it runs the following code:
format.html { :action => "new" }
and the page url changes to;
/something/3
(no /edit)
Why is this is this and how to prevent it, as it looks inconsistent to me and thus confusing.
Thanks
© Stack Overflow or respective owner