LoginSignup
0
0

More than 3 years have passed since last update.

renderとredirect_toの違い

Last updated at Posted at 2021-01-14

render

viewを返す

redirect_to

routesに遷移し、引数に該当するroutesを探す

→使い道としては「エラーが起きた時などにエラー処理を新たにcontrollerで走らせたい」だったり、「viewには表示したくないけど、内部でcontrollerのactionを走らせたい」だったりの処理をしたい時に使う。

参考文献

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0