Skip to content

Commit

Permalink
Merge pull request #33039 from ybakos/guides/layouts_and_rendering_cl…
Browse files Browse the repository at this point in the history
…ass_spelling_fix

Capitalize class name 'Product' in layouts and rendering guide.
  • Loading branch information
sikachu committed Jun 2, 2018
2 parents c184447 + 1de3c0d commit 32aa7cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guides/source/layouts_and_rendering.md
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,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.

There is also a shorthand for this. Assuming `@products` is a collection of `product` instances, you can simply write this in the `index.html.erb` to produce the same result:
There is also a shorthand for this. Assuming `@products` is a collection of `Product` instances, you can simply write this in the `index.html.erb` to produce the same result:

```html+erb
<h1>Products</h1>
Expand Down

0 comments on commit 32aa7cd

Please sign in to comment.