After running rails generate controller home index
in my Rails application, I see this line in routes.rb
get "home/index"
What does this line do? When I removed it, I didn't observe any difference it makes.
After running rails generate controller home index
in my Rails application, I see this line in routes.rb
get "home/index"
What does this line do? When I removed it, I didn't observe any difference it makes.
詳細については、Railsルーティングページを参照してください...
GET
ルーティングテーブルに、フォームのリクエストを送信するためのエントリを追加します
http://localhost:3000/home/index
アクションに対してHomeController#index
、応答をレンダリングし、結果をユーザーに表示します。
の省略表記です
match 'home/index' => 'home#index', :via => :get
アプリケーションが利用できる他のルートを確認するには、プロジェクトディレクトリ内でターミナルから次のコマンドを実行します
rake routes