在我的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