在我的Rails应用程序中,我使用了丰富的路由来实现基本的CRUD功能。但在某些情况下,我会向控制器添加新的视图和方法(例如,特定的报告功能)。这些会自动包含在丰富的路线中吗?或者我是否必须为每一个routes.rb中的获取或匹配行?Rails资源路径
这里是我如何与现在的routes.rb去...这似乎只是如果我有明确指定的一切,这是会得到unweildy随着应用的增长...
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
不,他们不会“自动添加”。你可以[添加足智多谋的路线](http://guides.rubyonrails.org/routing.html#adding-more-restful-actions)。 – 2013-04-23 19:09:09