diff options
author | Xavier Noria <fxn@hashref.com> | 2017-07-02 13:50:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-02 13:50:25 -0700 |
commit | 92c29d82eb2f323bb1338a039229a66057a7d137 (patch) | |
tree | 050eea5a719faa416b64b804617f8755b6500e09 /actionpack/lib/action_controller | |
parent | f851e1f705f26d8f92f0fc1b265b20bc389d23cb (diff) | |
parent | f443460670576cd82a806a851b7124479e8325c9 (diff) | |
download | rails-92c29d82eb2f323bb1338a039229a66057a7d137.tar.gz rails-92c29d82eb2f323bb1338a039229a66057a7d137.tar.bz2 rails-92c29d82eb2f323bb1338a039229a66057a7d137.zip |
Merge branch 'master' into require_relative_2017
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/log_subscriber.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/metal/params_wrapper.rb | 9 |
2 files changed, 3 insertions, 8 deletions
diff --git a/actionpack/lib/action_controller/log_subscriber.rb b/actionpack/lib/action_controller/log_subscriber.rb index d00fcbcd13..5d75393897 100644 --- a/actionpack/lib/action_controller/log_subscriber.rb +++ b/actionpack/lib/action_controller/log_subscriber.rb @@ -24,7 +24,7 @@ module ActionController exception_class_name = payload[:exception].first status = ActionDispatch::ExceptionWrapper.status_code_for_exception(exception_class_name) end - message = "Completed #{status} #{Rack::Utils::HTTP_STATUS_CODES[status]} in #{event.duration.round}ms" + message = "Completed #{status} #{Rack::Utils::HTTP_STATUS_CODES[status]} in #{event.duration.round}ms".dup message << " (#{additions.join(" | ".freeze)})" unless additions.empty? message << "\n\n" if defined?(Rails.env) && Rails.env.development? diff --git a/actionpack/lib/action_controller/metal/params_wrapper.rb b/actionpack/lib/action_controller/metal/params_wrapper.rb index 44151c9f71..818af549eb 100644 --- a/actionpack/lib/action_controller/metal/params_wrapper.rb +++ b/actionpack/lib/action_controller/metal/params_wrapper.rb @@ -232,12 +232,7 @@ module ActionController # by the metal call stack. def process_action(*args) if _wrapper_enabled? - if request.parameters[_wrapper_key].present? - wrapped_hash = _extract_parameters(request.parameters) - else - wrapped_hash = _wrap_parameters request.request_parameters - end - + wrapped_hash = _wrap_parameters request.request_parameters wrapped_keys = request.request_parameters.keys wrapped_filtered_hash = _wrap_parameters request.filtered_parameters.slice(*wrapped_keys) @@ -282,7 +277,7 @@ module ActionController return false unless request.has_content_type? ref = request.content_mime_type.ref - _wrapper_formats.include?(ref) && _wrapper_key && !request.request_parameters.key?(_wrapper_key) + _wrapper_formats.include?(ref) && _wrapper_key && !request.parameters.key?(_wrapper_key) end end end |