aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2010-04-10 15:13:21 -0400
committerwycats <wycats@gmail.com>2010-04-10 15:54:29 -0400
commit381f877bbbbf81d679f5be3b7ac7e961d41502bd (patch)
treeec31c887f61a8eb686fe1213f5754cd359892e13 /actionpack/lib/action_dispatch
parent5850edf104ab1da0f72a43e6717a1270134db293 (diff)
downloadrails-381f877bbbbf81d679f5be3b7ac7e961d41502bd.tar.gz
rails-381f877bbbbf81d679f5be3b7ac7e961d41502bd.tar.bz2
rails-381f877bbbbf81d679f5be3b7ac7e961d41502bd.zip
Revert "Revert "Use path_names, not resource_path_names, consistently""
This reverts commit d3ec4b1ba6528a081f5124fd71cc026b1f8abe9c.
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index 61256e8df1..7035e360ec 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_resources_path_names_scope(parent, child)
+ def merge_path_names_scope(parent, child)
merge_options_scope(parent, child)
end
@@ -521,7 +521,7 @@ module ActionDispatch
def initialize(*args) #:nodoc:
super
- @scope[:resources_path_names] = @set.resources_path_names
+ @scope[:path_names] = @set.resources_path_names
end
def resource(*resources, &block)
@@ -637,7 +637,7 @@ module ActionDispatch
return self
end
- resources_path_names = options.delete(:path_names)
+ 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, resources_path_names)}(.:format)", options.reverse_merge(:to => action))
+ return match("#{action_path(action, 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[:resources_path_names]
+ path_names ||= @scope[: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(:resources_path_names => path_names) do
+ scope(:path_names => path_names) do
send(method, resources.pop, options, &block)
end
return true