在我的 rails 应用程序中,我将资源丰富的路由用于基本的 CRUD 功能。但在某些情况下,我会向我的控制器添加新的视图和方法(例如,特定的报告功能)。这些会自动包含在资源丰富的路线中吗?或者我是否必须在 routes.rb 中为每个获取或匹配行?
这就是我现在使用 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