直接newアクションに飛ばすか、redirect_back を使用するかで悩んだけども、速度は全く一緒だったらめ、可読性を考慮して redirect_to を採用することにした。
test_controller.rb
redirect_to action: 'new' and return
redirect_back(fallback_location: worker_new_path) and return
Go to list of users who liked
Share on X(Twitter)
Share on Facebook
More than 5 years have passed since last update.
直接newアクションに飛ばすか、redirect_back を使用するかで悩んだけども、速度は全く一緒だったらめ、可読性を考慮して redirect_to を採用することにした。
redirect_to action: 'new' and return
redirect_back(fallback_location: worker_new_path) and return
Register as a new user and use Qiita more conveniently
Go to list of users who liked