<% flash.each do |key, msg| %>
<% unless msg.blank? %>
<%= content_tag(:div,(content_tag :p, msg), :class => "message #{key.to_s}" )%>
<%= flash[key.to_sym]='' %>
<% end %>
<% end %>
<%= yield %>