aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorFranco Catena <francocatena@gmail.com>2011-09-02 14:52:58 -0300
committerFranco Catena <francocatena@gmail.com>2011-09-02 14:52:58 -0300
commit78497c7c27879aa735db24377f056de96a260bb9 (patch)
treef904a562810e804324a0f02d7b6236e3e52dd931 /railties
parenteeda8403fd222c1109618834e4fe31a45e6531ca (diff)
downloadrails-78497c7c27879aa735db24377f056de96a260bb9.tar.gz
rails-78497c7c27879aa735db24377f056de96a260bb9.tar.bz2
rails-78497c7c27879aa735db24377f056de96a260bb9.zip
Change photos_path to photos_url in Using redirect_to
Is more "correct" a complete url than only the path
Diffstat (limited to 'railties')
-rw-r--r--railties/guides/source/layouts_and_rendering.textile2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/layouts_and_rendering.textile b/railties/guides/source/layouts_and_rendering.textile
index 3252f17c56..f49c2000ee 100644
--- a/railties/guides/source/layouts_and_rendering.textile
+++ b/railties/guides/source/layouts_and_rendering.textile
@@ -515,7 +515,7 @@ h4. Using +redirect_to+
Another way to handle returning responses to an HTTP request is with +redirect_to+. As you've seen, +render+ tells Rails which view (or other asset) to use in constructing a response. The +redirect_to+ method does something completely different: it tells the browser to send a new request for a different URL. For example, you could redirect from wherever you are in your code to the index of photos in your application with this call:
<ruby>
-redirect_to photos_path
+redirect_to photos_url
</ruby>
You can use +redirect_to+ with any arguments that you could use with +link_to+ or +url_for+. In addition, there's a special redirect that sends the user back to the page they just came from: