Merge pull request #51180 from cjilbert504/patch-1

Update layouts_and_rendering.md
This commit is contained in:
Edouard CHIN 2024-02-24 15:19:07 +01:00 committed by GitHub
commit 23af6f37a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1363,7 +1363,7 @@ Rails also makes a counter variable available within a partial called by the col
<%= product_counter %> # 0 for the first product, 1 for the second product...
```
This also works when the partial name is changed using the `as:` option. So if you did `as: :item`, the counter variable would be `item_counter`.
This also works when the local variable name is changed using the `as:` option. So if you did `as: :item`, the counter variable would be `item_counter`.
#### Spacer Templates