Permalink
Browse files

layouts and rendering guide: use content_for? instead of the yield or…

… yield idiom
  • Loading branch information...
1 parent 62dd1d8 commit 897f86a974636581b8409fd87b288581e2533c28 @fxn fxn committed Jul 15, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 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>

0 comments on commit 897f86a

Please sign in to comment.