WozPoz
WozPoz

Reputation: 992

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

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

Upvotes: 0

Views: 125

Answers (1)

James Wu
James Wu

Reputation: 11

I think you should use projects/permissions/userprojectpermission.

Upvotes: 1

Related Questions