aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/layouts_and_rendering.textile
diff options
context:
space:
mode:
authorMichael MacDonald <michaelm@amc.org.au>2010-08-31 11:01:05 +1000
committerMichael MacDonald <michaelm@amc.org.au>2010-08-31 11:01:05 +1000
commit362371690ffd72fc6ef3bf46c23d38be6e1f4ba0 (patch)
treeb5d7ac30e34af63e28475d2f4b1516d656403bb8 /railties/guides/source/layouts_and_rendering.textile
parent5076af5aa19f019396d4d33b92813503c0a728ec (diff)
downloadrails-362371690ffd72fc6ef3bf46c23d38be6e1f4ba0.tar.gz
rails-362371690ffd72fc6ef3bf46c23d38be6e1f4ba0.tar.bz2
rails-362371690ffd72fc6ef3bf46c23d38be6e1f4ba0.zip
Corrected typo in example on rendering collections in partials changing @posts to @products to match the example
Diffstat (limited to 'railties/guides/source/layouts_and_rendering.textile')
-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 fe5b4c8773..14107eb6f5 100644
--- a/railties/guides/source/layouts_and_rendering.textile
+++ b/railties/guides/source/layouts_and_rendering.textile
@@ -1087,7 +1087,7 @@ Partials are very useful in rendering collections. When you pass a collection to
When a partial is called with a pluralized collection, then the individual instances of the partial have access to the member of the collection being rendered via a variable named after the partial. In this case, the partial is +_product+, and within the +_product+ partial, you can refer to +product+ to get the instance that is being rendered.
-In Rails 3.0 there is also a shorthand for this, assuming +@posts+ is a collection of +post+ instances, you can simply do in the +index.html.erb+:
+In Rails 3.0 there is also a shorthand for this, assuming +@products+ is a collection of +product+ instances, you can simply do in the +index.html.erb+:
<erb>
<h1>Products</h1>