Let's go to the previous page Questions regarding the redirect method.
1. redirect : back
2. redirect_back(fallback_location: root_path)
When I wrote the first code, it said "undefined method" and there was an error It works fine with the second code works fine
What's the difference?
ruby-on-rails ruby redirect method
I think it's a typo. You can do redirect_to:back
but since 5.1 we don't support it
I recommend using the second one.
© 2024 OneMinuteCode. All rights reserved.