diff options
author | Matthew Draper <matthew@trebex.net> | 2015-12-22 17:14:22 +1030 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2015-12-22 17:14:22 +1030 |
commit | a60e68242fad108e449fce8442c0560c2874ceb1 (patch) | |
tree | 4992a1f84c8ef08573175f7320b338412336958c | |
parent | b5049bc995b09041548da75ec368d9f2753eb024 (diff) | |
parent | 4f5536068d290db3a7f9526454b5a147c84b4e9c (diff) | |
download | rails-a60e68242fad108e449fce8442c0560c2874ceb1.tar.gz rails-a60e68242fad108e449fce8442c0560c2874ceb1.tar.bz2 rails-a60e68242fad108e449fce8442c0560c2874ceb1.zip |
Merge pull request #22754 from ryohashimoto/151222_remove_content_tag_for
remove content_tag_for example
-rw-r--r-- | guides/source/layouts_and_rendering.md | 12 |
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 %> ``` |