aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2019-06-02 07:26:42 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2019-06-02 07:26:42 +0900
commit22274d320e36a4750fd83b096fb3a490c96559d6 (patch)
tree6fb91c00810ce100d8c91987e497ee046e4d0ee4 /actionpack
parent2a015f6c0be0593a624b0c800e5335319ac4c660 (diff)
downloadrails-22274d320e36a4750fd83b096fb3a490c96559d6.tar.gz
rails-22274d320e36a4750fd83b096fb3a490c96559d6.tar.bz2
rails-22274d320e36a4750fd83b096fb3a490c96559d6.zip
Simplify `ActionDispatch::Response#content_type`
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/http/response.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/http/response.rb b/actionpack/lib/action_dispatch/http/response.rb
index 61e3a870ab..e5cffccf35 100644
--- a/actionpack/lib/action_dispatch/http/response.rb
+++ b/actionpack/lib/action_dispatch/http/response.rb
@@ -244,8 +244,7 @@ module ActionDispatch # :nodoc:
# Content type of response.
def content_type
- type = super
- type&.empty? ? nil : type
+ super.presence
end
# Media type of response.