LoginSignup
2
4

More than 5 years have passed since last update.

railsのルーティングの設定についてまとめた

Posted at

ルーティングの設定場所

config/routes.rb

getとpostについて

  • get・・・DBを変更しないリクエストに使う。viewを表示させるときが主。
  • post・・・DBに変更を行う場合に用いる。form_tagから送る時によく使う。

getとpostは同じURLを設定しても別のルーティングとみなされる。

2
4
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
2
4