This project is archived and is in readonly mode.

#4394 ✓resolved
Jan De Poorter

Namespace nested in resources

Reported by Jan De Poorter | April 14th, 2010 @ 09:43 AM

When you nest a namespace in a resource, at the moment you get funky results. eg:

resources :clients do
  namespace :google do
    resource :account
  end
end

What you'd expect as path:

  /clients/:client_id/google/account
  client_google_account_path(42)

What you actually get at the moment:

  /clients/google/:client_id/account
  google_client_account_path(42)

This patch nests the namespace if we're in a resource.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages