File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
actionpack/lib/action_dispatch/journey Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -38,10 +38,7 @@ def serve(req)
38
38
req . path_info = "/" + req . path_info unless req . path_info . start_with? "/"
39
39
end
40
40
41
- tmp_params = set_params . merge route . defaults
42
- parameters . each_pair { |key , val |
43
- tmp_params [ key ] = val . force_encoding ( ::Encoding ::UTF_8 )
44
- }
41
+ tmp_params = set_params . merge route . defaults , parameters
45
42
46
43
req . path_parameters = tmp_params
47
44
req . route = route
@@ -131,11 +128,13 @@ def find_routes(req)
131
128
index = 1
132
129
match_data . names . each do |name |
133
130
if val = match_data [ index ]
134
- path_parameters [ name . to_sym ] = if val . include? ( "%" )
131
+ val = if val . include? ( "%" )
135
132
CGI . unescapeURIComponent ( val )
136
133
else
137
134
val
138
135
end
136
+ val . force_encoding ( ::Encoding ::UTF_8 )
137
+ path_parameters [ name . to_sym ] = val
139
138
end
140
139
index += 1
141
140
end
You can’t perform that action at this time.
0 commit comments