aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2015-05-21 13:04:37 +0200
committerKasper Timm Hansen <kaspth@gmail.com>2015-05-21 13:04:37 +0200
commit39037b70efbc4febdb56a91fecd6f3ebd656f8e5 (patch)
tree4e995d3210a62d626d190af64b693ad0915a50cd
parentb052a4626811080634443f0d6a5e9c2cab883049 (diff)
parent88787e780b3dfdfee05a66286da8e6b1b95e0512 (diff)
downloadrails-39037b70efbc4febdb56a91fecd6f3ebd656f8e5.tar.gz
rails-39037b70efbc4febdb56a91fecd6f3ebd656f8e5.tar.bz2
rails-39037b70efbc4febdb56a91fecd6f3ebd656f8e5.zip
Merge pull request #20244 from y-yagi/remove_div_for_from_guide
remove reference to `div_for` method from guide [ci skip]
-rw-r--r--guides/source/action_view_overview.md20
1 files changed, 0 insertions, 20 deletions
diff --git a/guides/source/action_view_overview.md b/guides/source/action_view_overview.md
index 88c1345f27..8a026cecac 100644
--- a/guides/source/action_view_overview.md
+++ b/guides/source/action_view_overview.md
@@ -317,26 +317,6 @@ The `box` layout simply wraps the `_article` partial in a `div`:
</div>
```
-The `_article` partial wraps the article's `body` in a `div` with the `id` of the article using the `div_for` helper:
-
-**articles/_article.html.erb**
-
-```html+erb
-<%= div_for(article) do %>
- <p><%= article.body %></p>
-<% end %>
-```
-
-this would output the following:
-
-```html
-<div class='box'>
- <div id='article_1'>
- <p>Partial Layouts are cool!</p>
- </div>
-</div>
-```
-
Note that the partial layout has access to the local `article` variable that was passed into the `render` call. However, unlike application-wide layouts, partial layouts still have the underscore prefix.
You can also render a block of code within a partial layout instead of calling `yield`. For example, if we didn't have the `_article` partial, we could do this instead: