From d3ec4b1ba6528a081f5124fd71cc026b1f8abe9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sat, 10 Apr 2010 10:47:40 +0200 Subject: Revert "Use path_names, not resource_path_names, consistently" Breaks tests on Ruby 1.8.7. This reverts commit 13bbf98d85029fd4e3563ac46413c7b72625bc25. --- actionpack/lib/action_dispatch/routing/mapper.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 8a3f602576..61256e8df1 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -372,7 +372,7 @@ module ActionDispatch @scope[:module] ? "#{@scope[:module]}/#{child}" : child end - def merge_path_names_scope(parent, child) + def merge_resources_path_names_scope(parent, child) merge_options_scope(parent, child) end @@ -521,7 +521,7 @@ module ActionDispatch def initialize(*args) #:nodoc: super - @scope[:path_names] = @set.resources_path_names + @scope[:resources_path_names] = @set.resources_path_names end def resource(*resources, &block) @@ -637,7 +637,7 @@ module ActionDispatch return self end - path_names = options.delete(:path_names) + resources_path_names = options.delete(:path_names) if args.first.is_a?(Symbol) action = args.first @@ -654,7 +654,7 @@ module ActionDispatch end else with_exclusive_name_prefix(action) do - return match("#{action_path(action, path_names)}(.:format)", options.reverse_merge(:to => action)) + return match("#{action_path(action, resources_path_names)}(.:format)", options.reverse_merge(:to => action)) end end end @@ -682,7 +682,7 @@ module ActionDispatch private def action_path(name, path_names = nil) - path_names ||= @scope[:path_name] + path_names ||= @scope[:resources_path_names] path_names[name.to_sym] || name.to_s end @@ -693,7 +693,7 @@ module ActionDispatch end if path_names = options.delete(:path_names) - scope(:path_names => path_names) do + scope(:resources_path_names => path_names) do send(method, resources.pop, options, &block) end return true -- cgit v1.2.3