aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2016-09-20 16:27:19 +0000
committerVijay Dev <vijaydev.cse@gmail.com>2016-09-20 16:27:19 +0000
commit67313650eb07bc7d99fb4fa3a339fb6c3a142f51 (patch)
treedf62b6aba4fa30c02e69e80aede7b807a9b7e676 /guides
parent52a0ee4695c22f86b1e46a23b7b377846aea0994 (diff)
parent2e0f20b8ad61f1daf924e271d7749b44d7be1cf6 (diff)
downloadrails-67313650eb07bc7d99fb4fa3a339fb6c3a142f51.tar.gz
rails-67313650eb07bc7d99fb4fa3a339fb6c3a142f51.tar.bz2
rails-67313650eb07bc7d99fb4fa3a339fb6c3a142f51.zip
Merge branch 'master' of github.com:rails/docrails
Diffstat (limited to 'guides')
-rw-r--r--guides/source/layouts_and_rendering.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/guides/source/layouts_and_rendering.md b/guides/source/layouts_and_rendering.md
index ad8ec15071..7e4ec5ba7e 100644
--- a/guides/source/layouts_and_rendering.md
+++ b/guides/source/layouts_and_rendering.md
@@ -630,6 +630,8 @@ to use in this case.
redirect_back(fallback_location: root_path)
```
+NOTE: `redirect_to` and `redirect_back` do not halt and return immediately from method execution, but simply set HTTP responses. Statements occurring after them in a method will be executed. You can halt by an explicit `return` or some other halting mechanism, if needed.
+
#### Getting a Different Redirect Status Code
Rails uses HTTP status code 302, a temporary redirect, when you call `redirect_to`. If you'd like to use a different status code, perhaps 301, a permanent redirect, you can use the `:status` option: