From 22274d320e36a4750fd83b096fb3a490c96559d6 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Sun, 2 Jun 2019 07:26:42 +0900 Subject: Simplify `ActionDispatch::Response#content_type` --- actionpack/lib/action_dispatch/http/response.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'actionpack') 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. -- cgit v1.2.3