From bc06641fa721ad64543dff7d90985b9e82d961ab Mon Sep 17 00:00:00 2001 From: Grant Shangreaux Date: Fri, 13 Sep 2019 15:31:46 -0500 Subject: [PATCH] Docs: note removal of `render :text` option from 5.1 guide [ci skip] This just makes it explicit that the deprecated :text option is completely removed in Rails 5.1 --- guides/source/upgrading_ruby_on_rails.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md index a4e78f90cb..c04335693c 100644 --- a/guides/source/upgrading_ruby_on_rails.md +++ b/guides/source/upgrading_ruby_on_rails.md @@ -530,6 +530,16 @@ To: Rails.application.secrets[:smtp_settings][:address] ``` +### Removed deprecated support to `:text` and `:nothing` in `render` + +If your views are using `render :text`, they will no longer work. The new method +of rendering text with MIME type of `text/plain` is to use `render :plain`. + +Similarly, `render :nothing` is also removed and you should use the `head` method +to send responses that contain only headers. For example, `head :ok` sends a +200 response with no body to render. + + Upgrading from Rails 4.2 to Rails 5.0 -------------------------------------