diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2019-06-02 07:26:42 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2019-06-02 07:26:42 +0900 |
commit | 22274d320e36a4750fd83b096fb3a490c96559d6 (patch) | |
tree | 6fb91c00810ce100d8c91987e497ee046e4d0ee4 /actionpack | |
parent | 2a015f6c0be0593a624b0c800e5335319ac4c660 (diff) | |
download | rails-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.rb | 3 |
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. |