route
namespace :admin do
resources :groups do |group|
resources :categories
end
end
routing
GET /admin/groups/:group_id/categories(.:format) {:controller=>"admin/categories", :action=>"index"}
admin_group_categories POST /admin/groups/:group_id/categories(.:format) {:controller=>"admin/categories", :action=>"create"}
new_admin_group_category GET /admin/groups/:group_id/categories/new(.:format) {:controller=>"admin/categories", :action=>"new"}
GET /admin/groups/:group_id/categories/:id(.:format) {:controller=>"admin/categories", :action=>"show"}
PUT /admin/groups/:group_id/categories/:id(.:format) {:controller=>"admin/categories", :action=>"update"}
admin_group_category DELETE /admin/groups/:group_id/categories/:id(.:format) {:controller=>"admin/categories", :action=>"destroy"}
edit_admin_group_category GET /admin/groups/:group_id/categories/:id/edit(.:format) {:controller=>"admin/categories", :action=>"edit"}
GET /admin/groups(.:format) {:controller=>"admin/groups", :action=>"index"}
admin_groups POST /admin/groups(.:format) {:controller=>"admin/groups", :action=>"create"}
new_admin_group GET /admin/groups/new(.:format) {:controller=>"admin/groups", :action=>"new"}
GET /admin/groups/:id(.:format) {:controller=>"admin/groups", :action=>"show"}
PUT /admin/groups/:id(.:format) {:controller=>"admin/groups", :action=>"update"}
admin_group DELETE /admin/groups/:id(.:format) {:controller=>"admin/groups", :action=>"destroy"}
edit_admin_group GET /admin/groups/:id/edit(.:format) {:controller=>"admin/groups", :action=>"edit"}
root / {:controller=>"home", :action=>"index"}
i teraz problem: wszystko okej okej w widokach grup dopiero w kategoria dzieją się cuda ( albo po prostu czegoś nie rozumie )
…/categories/index.html.erb
[code]<% @categories.each do |category| %>