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

Hello, 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

Try this:

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