私の Rails アプリでは、基本的な CRUD 関数にリソースの豊富なルートを使用しています。しかし、場合によっては、コントローラーに新しいビューとメソッドを追加しています (特定のレポート機能など)。これらはリソースフル ルートに自動的に含まれますか? それとも、routes.rb の行ごとに get または match 行を作成する必要がありますか?
これがroutes.rbの現在のやり方です...すべてを明示的に指定する必要がある場合、アプリが成長するにつれてこれは扱いにくくなるようです...
resources :procedures
resources :headlines
devise_for :users
resources :services
resources :headlines
get "welcome/index"
get "welcome/profile"
get "welcome/kpi"
get "welcome/inventory"
get "public/index"
match "insurancelist" => "appointments#insurancelist"
get "admin/index"
get "dentrix/index"
get "dexis/index"
get "eaglesoft/index"
get "reports/index"
get "reports/dentist"
get "reports/office"
get "reports/collections"
resources :patients
shallow do
resources :locations do
resources :practitioners do
resources :timecards
resources :appointments
end
end
end