1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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

This commit is contained in:
Xavier Noria 2010-07-15 09:47:00 +02:00
parent 62dd1d8d23
commit 897f86a974

View file

@ -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>