mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Reduce Array and Hash creations in Journey find_routes
This commit is contained in:
parent
a1b6c1669f
commit
bea24d4790
1 changed files with 2 additions and 1 deletions
|
@ -121,7 +121,8 @@ module ActionDispatch
|
|||
routes.map! { |r|
|
||||
match_data = r.path.match(req.path_info)
|
||||
path_parameters = {}
|
||||
match_data.names.zip(match_data.captures) { |name, val|
|
||||
match_data.names.each_with_index { |name, i|
|
||||
val = match_data[i + 1]
|
||||
path_parameters[name.to_sym] = Utils.unescape_uri(val) if val
|
||||
}
|
||||
[match_data, path_parameters, r]
|
||||
|
|
Loading…
Reference in a new issue