content_for
actually added by default. From the documentation if you need ...
<% content_for :navigation do %> <li><%= link_to 'Home', :action => 'index' %></li> <% end %> <%# Add some other content, or use a different template: %> <% content_for :navigation do %> <li><%= link_to 'Login', :action => 'login' %></li> <% end %>
If you used ...
<ul><%= content_for :navigation %></ul>
He infers ...
<ul> <li><a href="/">Home</a></li> <li><a href="/login">Login</a></li> </ul>
Just tested it locally in a rails 3.1.0 application to make sure this is still the case and it does it well.
source share