diff options
author | Akira Matsuda <ronnie@dio.jp> | 2019-07-31 17:28:18 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2019-07-31 17:41:34 +0900 |
commit | f0fdeaa175ccb1230b9027d25d7d4cfe62d04e46 (patch) | |
tree | 154e8e3e5e61df105e96e0218e401f1faec584a7 /actionpack | |
parent | 5ae814d016cfa1fdc4211d2e5c618a233c6c9200 (diff) | |
download | rails-f0fdeaa175ccb1230b9027d25d7d4cfe62d04e46.tar.gz rails-f0fdeaa175ccb1230b9027d25d7d4cfe62d04e46.tar.bz2 rails-f0fdeaa175ccb1230b9027d25d7d4cfe62d04e46.zip |
Reduce method calls
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_controller/log_subscriber.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/log_subscriber.rb b/actionpack/lib/action_controller/log_subscriber.rb index d8b04d8ddb..033ad10d4c 100644 --- a/actionpack/lib/action_controller/log_subscriber.rb +++ b/actionpack/lib/action_controller/log_subscriber.rb @@ -22,8 +22,7 @@ module ActionController additions = ActionController::Base.log_process_action(payload) status = payload[:status] - if status.nil? && payload[:exception].present? - exception_class_name = payload[:exception].first + if status.nil? && (exception_class_name = payload[:exception].first) status = ActionDispatch::ExceptionWrapper.status_code_for_exception(exception_class_name) end |