Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # in some_layout.html.erb
- <html>
- <head>
- ...
- </head>
- <body>
- <% render :partial => 'header' %>
- ...
- # in _header.html.erb
- <div id="header">
- <ul id="menu">
- <% yield :menu_options %>
- </ul>
- </div>
- # in _index_menu_options.html.erb
- <li><a href="#">Foo</a></li>
- <li><a href="#">Bar</a></li>
- # in index.html.erb
- <% content_for :menu_options %>
- <%= render :partial => 'index_menu_options' %>
- <% end %>
Add Comment
Please, Sign In to add comment