aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides
diff options
context:
space:
mode:
authorAndreas Scherer <andreas_coder@freenet.de>2009-02-11 14:13:03 +0100
committerAndreas Scherer <andreas_coder@freenet.de>2009-02-11 14:13:03 +0100
commita088848200d52d2406717ac171c092d632c04add (patch)
treef6398a120f451fd786a9a3362886d3ce345f8633 /railties/guides
parent36f33ef5f6e82adaa4a5b720b2959ed299e2b069 (diff)
downloadrails-a088848200d52d2406717ac171c092d632c04add.tar.gz
rails-a088848200d52d2406717ac171c092d632c04add.tar.bz2
rails-a088848200d52d2406717ac171c092d632c04add.zip
More consistent use of 'an' in front of 'h'.
Diffstat (limited to 'railties/guides')
-rw-r--r--railties/guides/source/layouts_and_rendering.textile4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/guides/source/layouts_and_rendering.textile b/railties/guides/source/layouts_and_rendering.textile
index cf3410b502..3d27b52e41 100644
--- a/railties/guides/source/layouts_and_rendering.textile
+++ b/railties/guides/source/layouts_and_rendering.textile
@@ -419,7 +419,7 @@ end
h4. Using redirect_to
-Another way to handle returning responses to a 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:
+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
@@ -443,7 +443,7 @@ Just like the +:status+ option for +render+, +:status+ for +redirect_to+ accepts
h5. The Difference Between render and redirect
-Sometimes inexperienced developers conceive of +redirect_to+ as a sort of +goto+ command, moving execution from one place to another in your Rails code. This is _not_ correct. Your code stops running and waits for a new request for the browser. It just happens that you've told the browser what request it should make next, by sending back a HTTP 302 status code.
+Sometimes inexperienced developers conceive of +redirect_to+ as a sort of +goto+ command, moving execution from one place to another in your Rails code. This is _not_ correct. Your code stops running and waits for a new request for the browser. It just happens that you've told the browser what request it should make next, by sending back an HTTP 302 status code.
Consider these actions to see the difference: