diff options
author | yui-knk <spiketeika@gmail.com> | 2017-07-13 14:28:21 +0900 |
---|---|---|
committer | yui-knk <spiketeika@gmail.com> | 2017-07-13 14:29:46 +0900 |
commit | c46dbb355b2b2218e4b0b2bcf1898e6d50f3a907 (patch) | |
tree | 5c233965485d768294e6ff7344d822bbde0f253d /actionpack | |
parent | 7fa61b1550afab242353e5a093854f88569c4db7 (diff) | |
download | rails-c46dbb355b2b2218e4b0b2bcf1898e6d50f3a907.tar.gz rails-c46dbb355b2b2218e4b0b2bcf1898e6d50f3a907.tar.bz2 rails-c46dbb355b2b2218e4b0b2bcf1898e6d50f3a907.zip |
Brush up local variables assignment
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/http/response.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/http/response.rb b/actionpack/lib/action_dispatch/http/response.rb index 9b510d4ab9..d84f4701c6 100644 --- a/actionpack/lib/action_dispatch/http/response.rb +++ b/actionpack/lib/action_dispatch/http/response.rb @@ -257,11 +257,10 @@ module ActionDispatch # :nodoc: # response.charset = 'utf-16' # => 'utf-16' # response.charset = nil # => 'utf-8' def charset=(charset) - header_info = parsed_content_type_header + content_type = parsed_content_type_header.mime_type if false == charset - set_content_type header_info.mime_type, nil + set_content_type content_type, nil else - content_type = header_info.mime_type set_content_type content_type, charset || self.class.default_charset end end |