<% if not @messages_rendered -%>
  <% if flash[:error] -%>
    <div class="alert alert-banner alert-error">
      <button type="button" class="close" data-dismiss="alert">&times;</button>
      <h4><%=h flash[:error] %></h4>
    </div>
  <% end -%>
  <% if flash[:notice] -%>
    <div class="alert alert-banner">
      <button type="button" class="close" data-dismiss="alert">&times;</button>
      <h4><%=h flash[:notice] %></h4>
    </div>
  <% end -%>
<% end -%>
<% @messages_rendered = true -%>