This project is archived and is in readonly mode.
Resource routes with :path_name and :member
Reported by Eugene Pimenov | April 18th, 2008 @ 07:33 PM
Commit 063c393bf0a2eb762770c97f925b7c2867361ad4 introduce bug with resource routes when member and path_names specified.
For example:
map.routes :messages, :path_names => {:new => 'nuevo'}, :member => {:mark => :put}
and resources.rb lines 526-533
action_options = action_options_for(action, resource, method)
action_path = action
if resource.options[:path_names]
action_path = resource.options[:path_names][action]
action_path ||= Base.resources_path_names[action]
end
map.named_route("#{action}_#{resource.name_prefix}#{resource.singular}", "#{resource.member_path}#{resource.action_separator}#{action_path}", action_options)
Since :mark not in :path_names nor resources_path_names, it became nil,
and named_route tries to map /messages/:id to mark_messages_path.
Comments and changes to this ticket
-
Repository April 23rd, 2008 @ 09:23 AM
- State changed from new to resolved
(from [e6a3ce3392812f707b78d64ffb04ee52f4517d20]) Make sure member names aren't mistakenly set to nil when providing :path_names
[#19 state:resolved]
Signed-off-by: Michael Koziarski
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>