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:
parent
62dd1d8d23
commit
897f86a974
1 changed files with 1 additions and 1 deletions
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue