<% unless @tag.nil? %>
<%= error_messages_for 'tag' %>
<% end -%>

<% for name in [:notice, :warning, :error, :message] %>
  <% if @flash[name] %>
    <%= "<div class=\"#{name}\">#{@flash[name]}</div>" %>
  <% end %>
<% end %>