-
-
Notifications
You must be signed in to change notification settings - Fork 542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No redirect_to :back? #649
Comments
Looks like Rails now advocates using I'm open to this, but it's also really easy for people to implement themselves. Something like: What do others think? |
I agree that it's easy to implement it if needed, but it would be a good idea to document it somewhere. I've not had a lot of use cases where a redirect back was necessary... @vladdypwnz basically, when a submission fails, you should re-render the template, not redirect back, otherwise you'll lose your form errors One of the only redirect back use case is on user login within the page where he must go back, but it's better handled with either a session or url param, in case the user enters a wrong password... |
I am with @TiteiKo on this. It is pretty trivial to implement. The question is should we? There are certain patterns that Rails advocates that has proven not-so-good practice. I am open for more input if this pattern proves useful. |
I also agree with @TiteiKo. We should document this feature, not implement it. Implementing a half-baked (because it requires a fallback URL for when 'referer' isn't set) solution seems like a bad idea. The doc note could go here: http://hanamirb.org/guides/actions/control-flow/ ? |
@cllns Do you want me to include this in the docs. I agree this is too trivial for a framework support. It should be left to dev to implement really. |
Go for it @theCrab :) Thanks |
@vladdypwnz
yes Because you all voted against it, I'm removing the |
I checked out the source and it doesn't seem like that's possible. Is this something that's PR worthy? Should a current template be re-rendered instead or something?
The text was updated successfully, but these errors were encountered: