aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r--actionpack/lib/action_controller/base.rb5
-rw-r--r--actionpack/lib/action_controller/metal/instrumentation.rb2
-rw-r--r--actionpack/lib/action_controller/metal/params_wrapper.rb5
3 files changed, 7 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index ccf1632a14..c03c77cb4a 100644
--- a/actionpack/lib/action_controller/base.rb
+++ b/actionpack/lib/action_controller/base.rb
@@ -194,7 +194,6 @@ module ActionController
Caching,
MimeResponds,
ImplicitRender,
- ParamsWrapper,
Cookies,
Flash,
@@ -215,6 +214,10 @@ module ActionController
# all the methods properly.
Instrumentation,
+ # Params wrapper should come before instrumentation so they are
+ # properly showed in logs
+ ParamsWrapper,
+
# The same with rescue, append it at the end to wrap as much as possible.
Rescue
]
diff --git a/actionpack/lib/action_controller/metal/instrumentation.rb b/actionpack/lib/action_controller/metal/instrumentation.rb
index dc3ea939e6..4e54c2ad88 100644
--- a/actionpack/lib/action_controller/metal/instrumentation.rb
+++ b/actionpack/lib/action_controller/metal/instrumentation.rb
@@ -14,7 +14,7 @@ module ActionController
attr_internal :view_runtime
- def process_action(action, *args)
+ def process_action(*args)
raw_payload = {
:controller => self.class.name,
:action => self.action_name,
diff --git a/actionpack/lib/action_controller/metal/params_wrapper.rb b/actionpack/lib/action_controller/metal/params_wrapper.rb
index 3262e24f67..d128f6d03c 100644
--- a/actionpack/lib/action_controller/metal/params_wrapper.rb
+++ b/actionpack/lib/action_controller/metal/params_wrapper.rb
@@ -178,14 +178,13 @@ module ActionController
def process_action(*args)
if _wrapper_enabled?
wrapped_hash = { _wrapper_key => request.request_parameters.slice(*_wrapped_keys) }
- wrapped_filtered_hash = { _wrapper_key => request.filtered_parameters.slice(*_wrapped_keys) }
# This will make the wrapped hash accessible from controller and view
request.parameters.merge! wrapped_hash
request.request_parameters.merge! wrapped_hash
# This will make the wrapped hash displayed in the log file
- request.filtered_parameters.merge! wrapped_filtered_hash
+ request.clear_filtered_parameters
end
super
end
@@ -215,7 +214,7 @@ module ActionController
# Checks if we should perform parameters wrapping.
def _wrapper_enabled?
ref = request.content_mime_type.try(:ref)
- _wrapper_formats.any? { |format| format == ref } && !request.request_parameters[_wrapper_key]
+ _wrapper_formats.include?(ref) && !request.request_parameters[_wrapper_key]
end
end
end