How to configure redirect after standard actions? #184
Answered
by
janko
whysthatso
asked this question in
Q&A
-
I'm embedding forms for 'change password' and 'change login' in a profile model's show view. after submitting successful changes to either password or login i am redirected to the root page. how would i change this behaviour, i.e. redirect back to the profile show action? |
Beta Was this translation helpful? Give feedback.
Answered by
janko
Dec 13, 2022
Replies: 1 comment 2 replies
-
There are change_password_redirect { rails_routes.profile_path } # or just "/profile"
change_login_redirect { rails_routes.profile_path } # or just "/profile" There is also a |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
whysthatso
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There are
*_redirect
configuration methods for various redirects, so in this case you could do:There is also a
default_redirect
which most redirects default to, you can change it if you'd like most actions to the same place.