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.
1 parent 1142fd4 commit afcf3fcCopy full SHA for afcf3fc
actionpack/lib/action_dispatch/journey/router.rb
@@ -118,15 +118,17 @@ def find_routes(req)
118
119
routes.sort_by!(&:precedence)
120
121
- routes.each { |r|
+ routes.each do |r|
122
match_data = r.path.match(path_info)
123
path_parameters = {}
124
- match_data.names.each_with_index { |name, i|
125
- val = match_data[i + 1]
+ index = 1
+ match_data.names.each do |name|
126
+ val = match_data[index]
127
path_parameters[name.to_sym] = Utils.unescape_uri(val) if val
- }
128
+ index += 1
129
+ end
130
yield [match_data, path_parameters, r]
131
132
end
133
134
def match_head_routes(routes, req)
0 commit comments