<% if content_for? :content %>
<%= yield :content %>
<% else %>
<%= render :partial => "layouts/flash", :locals => { :flash => flash } %>
<% if content_for? :heading %>
<% if content_for? :content %>
<%= yield :content %>
<% else %>
<%= render :partial => "layouts/flash", :locals => { :flash => flash } %>
<% if content_for? :heading %>