aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorRyo Hashimoto <ryohashimoto@gmail.com>2015-12-22 14:51:05 +0900
committerRyo Hashimoto <ryohashimoto@gmail.com>2015-12-22 14:51:05 +0900
commit4f5536068d290db3a7f9526454b5a147c84b4e9c (patch)
treefb3be4c1e20df7f97eff56f41368ae477d9db1a8 /guides
parent17a4e450489a785af53d3e11f5a35ec1e8ea0903 (diff)
downloadrails-4f5536068d290db3a7f9526454b5a147c84b4e9c.tar.gz
rails-4f5536068d290db3a7f9526454b5a147c84b4e9c.tar.bz2
rails-4f5536068d290db3a7f9526454b5a147c84b4e9c.zip
remove content_tag_for example
Diffstat (limited to 'guides')
-rw-r--r--guides/source/layouts_and_rendering.md12
1 files changed, 5 insertions, 7 deletions
diff --git a/guides/source/layouts_and_rendering.md b/guides/source/layouts_and_rendering.md
index 4bb364c0f8..9b7f916b9e 100644
--- a/guides/source/layouts_and_rendering.md
+++ b/guides/source/layouts_and_rendering.md
@@ -1157,14 +1157,12 @@ To pass a local variable to a partial in only specific cases use the `local_assi
* `_articles.html.erb`
```erb
- <%= content_tag_for :article, article do |article| %>
- <h2><%= article.title %></h2>
+ <h2><%= article.title %></h2>
- <% if local_assigns[:full] %>
- <%= simple_format article.body %>
- <% else %>
- <%= truncate article.body %>
- <% end %>
+ <% if local_assigns[:full] %>
+ <%= simple_format article.body %>
+ <% else %>
+ <%= truncate article.body %>
<% end %>
```