aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/upgrading_ruby_on_rails.md
diff options
context:
space:
mode:
authorJoel Hawksley <joelhawksley@github.com>2019-06-03 08:27:09 -0600
committerGitHub <noreply@github.com>2019-06-03 08:27:09 -0600
commit60af9db3745f994e8a4bd7afe9dfa6ea8be7bb7c (patch)
tree99c9199bf71835f18e2c746b04abe70569e5baed /guides/source/upgrading_ruby_on_rails.md
parenta85c372798723b900762c27e62c35689905327aa (diff)
parentc926ca46280aee795b98206dd0707a96b9423cc5 (diff)
downloadrails-60af9db3745f994e8a4bd7afe9dfa6ea8be7bb7c.tar.gz
rails-60af9db3745f994e8a4bd7afe9dfa6ea8be7bb7c.tar.bz2
rails-60af9db3745f994e8a4bd7afe9dfa6ea8be7bb7c.zip
Merge pull request #2 from rails/master
merge master
Diffstat (limited to 'guides/source/upgrading_ruby_on_rails.md')
-rw-r--r--guides/source/upgrading_ruby_on_rails.md22
1 files changed, 22 insertions, 0 deletions
diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md
index b8a5c39f39..1110592d5e 100644
--- a/guides/source/upgrading_ruby_on_rails.md
+++ b/guides/source/upgrading_ruby_on_rails.md
@@ -134,6 +134,28 @@ Action Cable JavaScript API:
+ ActionCable.logger.enabled = false
```
+### `ActionDispatch::Response#content_type` now returned Content-Type header as it is.
+
+Previously, `ActionDispatch::Response#content_type` returned value does NOT contain charset part.
+This behavior changed to returned Content-Type header containing charset part as it is.
+
+If you want just MIME type, please use `ActionDispatch::Response#media_type` instead.
+
+Before:
+
+```ruby
+resp = ActionDispatch::Response.new(200, "Content-Type" => "text/csv; header=present; charset=utf-16")
+resp.content_type #=> "text/csv; header=present"
+```
+
+After:
+
+```ruby
+resp = ActionDispatch::Response.new(200, "Content-Type" => "text/csv; header=present; charset=utf-16")
+resp.content_type #=> "text/csv; header=present; charset=utf-16"
+resp.media_type #=> "text/csv"
+```
+
### Autoloading
The default configuration for Rails 6