[英]Rails, geting up routes & controllers
I have a Groups Controller, giving URLS like: 我有一个网上论坛控制器,提供的URL如下:
/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
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.