File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -710,13 +710,24 @@ Rails.application.secrets[:smtp_settings][:address]
710
710
711
711
### Removed deprecated support to ` :text ` and ` :nothing ` in ` render `
712
712
713
- If your views are using ` render :text ` , they will no longer work. The new method
713
+ If your controllers are using ` render :text ` , they will no longer work. The new method
714
714
of rendering text with MIME type of ` text/plain ` is to use ` render :plain ` .
715
715
716
716
Similarly, ` render :nothing ` is also removed and you should use the ` head ` method
717
717
to send responses that contain only headers. For example, ` head :ok ` sends a
718
718
200 response with no body to render.
719
719
720
+ ### Removed deprecated support of ` redirect_to :back `
721
+
722
+ In Rails 5.0, ` redirect_to :back ` was deprecated. In Rails 5.1, it was removed completely.
723
+
724
+ As an alternative, use ` redirect_back ` . It's important to note that ` redirect_back ` also takes
725
+ a ` fallback_location ` option which will be used in case the ` HTTP_REFERER ` is missing.
726
+
727
+ ```
728
+ redirect_back(fallback_location: root_path)
729
+ ```
730
+
720
731
721
732
Upgrading from Rails 4.2 to Rails 5.0
722
733
-------------------------------------
You can’t perform that action at this time.
0 commit comments