This project is archived and is in readonly mode.

#4159 ✓invalid
deepak

path_names not working in nested routes

Reported by deepak | March 12th, 2010 @ 11:05 AM | in 2.3.6

the option of path_names is not working in nested resources.

in the example route.rb below:

map.resources :user, :only => [:show] do |user|
   user.resources :setting, :only => [:index, :create, :show, :update]
   user.resources :posts, :only => [:index, :create] do |posts|
   posts.resources :setting, :only => [:index], :path_names => {:index => 'index_setting'}
   end
end

the route, "/user/:user_id/posts/:post_id/setting" should have the endpoint 'index_setting' but it is still 'index'

have tested it on rails 2.3.5.

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>

People watching this ticket

Pages