开发者

Rails 3 - Issue with Nested Routes, It's not allow for a custom collection?

开发者 https://www.devze.com 2023-01-19 23:11 出处:网络
I have the following in my routes.rb: resources :projects do resources :photos, :permissions collection do

I have the following in my routes.rb:

resources :projects do
  resources :photos, :permissions
    collection do
        get 'yourcurrentprojects', 'userprojectpermission'
    end
end

But when I do, projects/3/permissions/userprojectpermission开发者_运维百科 i get a routing error: No route matches "/projects/3/permissions/userprojectpermission"

Did I define this wrong? Thank you for your help


I think you should use projects/permissions/userprojectpermission.

0

精彩评论

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

关注公众号