We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 887d4e1 + 9ec803b commit c7620bbCopy full SHA for c7620bb
actionpack/lib/action_dispatch/journey/router.rb
@@ -106,8 +106,9 @@ def filter_routes(path)
106
end
107
108
def find_routes(req)
109
- routes = filter_routes(req.path_info).concat custom_routes.find_all { |r|
110
- r.path.match?(req.path_info)
+ path_info = req.path_info
+ routes = filter_routes(path_info).concat custom_routes.find_all { |r|
111
+ r.path.match?(path_info)
112
}
113
114
if req.head?
@@ -119,7 +120,7 @@ def find_routes(req)
119
120
routes.sort_by!(&:precedence)
121
122
routes.map! { |r|
- match_data = r.path.match(req.path_info)
123
+ match_data = r.path.match(path_info)
124
path_parameters = {}
125
match_data.names.each_with_index { |name, i|
126
val = match_data[i + 1]
0 commit comments