开发者

Rails, geting up routes & controllers

I have a Groups Controller, giving URLS like:

/project/3
/project/555

In a project I want to have tabs like

/project/3
/project/3/activityfeed
/project/3/开发者_高级运维photos
/project/3/settings

What's the right way to set this up in the routes and controller file? thanks


You could do that using Nested resources

resources :projects do
  resources :activityfeed
  resources :photos
  resources :settings
end
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜