Skip to content

Commit

Permalink
Merge pull request #37197 from unabridged/add-render-text-removal-to-…
Browse files Browse the repository at this point in the history
…5.1-upgrade-guide

[ci skip] Note removal of `render :text` & `:nothing` options from 5.1 upgrade guide
  • Loading branch information
gmcgibbon committed Sep 16, 2019
1 parent 4d2d0a5 commit 89314d0
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions guides/source/upgrading_ruby_on_rails.md
Expand Up @@ -529,6 +529,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
-------------------------------------

Expand Down

0 comments on commit 89314d0

Please sign in to comment.