aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r--actionpack/lib/action_dispatch/http/parameters.rb22
1 files changed, 11 insertions, 11 deletions
diff --git a/actionpack/lib/action_dispatch/http/parameters.rb b/actionpack/lib/action_dispatch/http/parameters.rb
index a9d1a501ab..42e80b9bf5 100644
--- a/actionpack/lib/action_dispatch/http/parameters.rb
+++ b/actionpack/lib/action_dispatch/http/parameters.rb
@@ -43,17 +43,6 @@ module ActionDispatch
end
alias :params :parameters
- def set_custom_encoding(params)
- action = params[:action]
- params.each do |k, v|
- if v.is_a?(String) && v.encoding != encoding_template(action, k)
- params[k] = v.force_encoding(encoding_template(action, k))
- end
- end
-
- params
- end
-
def path_parameters=(parameters) #:nodoc:
delete_header("action_dispatch.request.parameters")
@@ -76,6 +65,17 @@ module ActionDispatch
private
+ def set_custom_encoding(params)
+ action = params[:action]
+ params.each do |k, v|
+ if v.is_a?(String) && v.encoding != encoding_template(action, k)
+ params[k] = v.force_encoding(encoding_template(action, k))
+ end
+ end
+
+ params
+ end
+
def encoding_template(action, param)
controller_class.encoding_for_param(action, param)
end