aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-05-29 15:05:22 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-05-29 15:05:22 -0700
commitb3719d34d2f4db55dd622104ff77ac5970c42d89 (patch)
tree99a1a331075dbd821230531e2f1a30949c08bc38 /actionpack/lib
parentffbe1b18c23b649c46e8f995cc1577ab6b7ead54 (diff)
downloadrails-b3719d34d2f4db55dd622104ff77ac5970c42d89.tar.gz
rails-b3719d34d2f4db55dd622104ff77ac5970c42d89.tar.bz2
rails-b3719d34d2f4db55dd622104ff77ac5970c42d89.zip
disconnect path from the instance
Diffstat (limited to 'actionpack/lib')
-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 63cd2169a5..1f9333cb65 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -64,11 +64,11 @@ module ActionDispatch
ANCHOR_CHARACTERS_REGEX = %r{\A(\\A|\^)|(\\Z|\\z|\$)\Z}
WILDCARD_PATH = %r{\*([^/\)]+)\)?$}
- attr_reader :scope, :path, :options, :requirements, :conditions, :defaults
+ attr_reader :scope, :options, :requirements, :conditions, :defaults
attr_reader :to, :default_controller, :default_action
def initialize(set, scope, path, options)
- @set, @scope, @path = set, scope, path
+ @set, @scope = set, scope
@requirements, @conditions, @defaults = {}, {}, {}
options = scope[:options].merge(options) if scope[:options]
@@ -76,12 +76,12 @@ module ActionDispatch
@default_controller = options[:controller] || scope[:controller]
@default_action = options[:action] || scope[:action]
- @path = normalize_path! @path, options[:format]
- ast = path_ast @path
+ path = normalize_path! path, options[:format]
+ ast = path_ast path
path_params = path_params ast
@options = normalize_options!(options, path_params, ast)
normalize_requirements!(path_params)
- normalize_conditions!(path_params)
+ normalize_conditions!(path_params, path)
normalize_defaults!
end
@@ -193,7 +193,7 @@ module ActionDispatch
end
end
- def normalize_conditions!(path_params)
+ def normalize_conditions!(path_params, path)
@conditions[:path_info] = path
constraints.each do |key, condition|