From 4f5536068d290db3a7f9526454b5a147c84b4e9c Mon Sep 17 00:00:00 2001 From: Ryo Hashimoto Date: Tue, 22 Dec 2015 14:51:05 +0900 Subject: remove content_tag_for example --- guides/source/layouts_and_rendering.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'guides') 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| %> -

<%= article.title %>

+

<%= article.title %>

- <% 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 %> ``` -- cgit v1.2.3