2013年5月18日土曜日

railsのルーティング設定をリスト表示する

rakeコマンドの引数に「routes」を指定して実行することでルーティング設定をリスト表示することができる。

%rails_project%/bin/rake routes

実行結果例

Prefix Verb   URI Pattern               Controller#Action
   users_new GET    /users/new(.:format)      users#new
       users GET    /users(.:format)          users#index
             POST   /users(.:format)          users#create