aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2010-07-15 09:47:00 +0200
committerXavier Noria <fxn@hashref.com>2010-07-15 09:47:22 +0200
commit897f86a974636581b8409fd87b288581e2533c28 (patch)
tree4f656713373fb797ca0370cf700fcd9000607826 /railties
parent62dd1d8d23c843fa4839e47b9e67d84c15a61f35 (diff)
downloadrails-897f86a974636581b8409fd87b288581e2533c28.tar.gz
rails-897f86a974636581b8409fd87b288581e2533c28.tar.bz2
rails-897f86a974636581b8409fd87b288581e2533c28.zip
layouts and rendering guide: use content_for? instead of the yield or yield idiom
Diffstat (limited to 'railties')
-rw-r--r--railties/guides/source/layouts_and_rendering.textile2
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/source/layouts_and_rendering.textile b/railties/guides/source/layouts_and_rendering.textile
index f4ba6dd53b..b9a201e5f0 100644
--- a/railties/guides/source/layouts_and_rendering.textile
+++ b/railties/guides/source/layouts_and_rendering.textile
@@ -1168,7 +1168,7 @@ Suppose you have the following +ApplicationController+ layout:
<body>
<div id="top_menu">Top menu items here</div>
<div id="menu">Menu items here</div>
- <div id="content"><%= yield(:content) or yield %></div>
+ <div id="content"><%= content_for?(:content) ? yield(:content) : yield %></div>
</body>
</html>
</erb>