This project is archived and is in readonly mode.
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
-
Andrew White March 28th, 2010 @ 12:48 PM
The path_names option only applies to actions that add to the path like new, edit and any additional member actions you add. In your example to change setting to index_setting then you'd need to use the :as option.
-
Rizwan Reza March 28th, 2010 @ 07:49 PM
- Milestone set to 2.3.6
- State changed from new to invalid
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>