no need to create a helper method:
<% if @content_for_sidebar %> <div id="sidebar"> <%= yield :sidebar %> </div> <% end %>
then of course in your opinion:
<% content_for :sidebar do %> ... <% end %>
I use this all the time to conditionally jump between one column and two column layouts
efalcao Mar 11 '09 at 20:36 2009-03-11 20:36
source share