Displaying 1 result from an estimated 1 matches for "load_compani".
Did you mean:
load_company
2010 Mar 08
0
Nested Resources + Namespace + Friendly URL
Hi, all
In my rails app I have a controller called Dashboard::MenusController
with a namespace dashboard.
I have a model Company too, where its has_many :menus
So, I have the code above in my route.rb
map.namespace (:dashboard) do |dashboard|
dashboard.resources :companies,
:has_many => :menus
end
With this route I can create a new menu by: dashboard/companies/1/