<% flash.each do |k, v| %> <%= content_tag(:div, :id=>"message_#{k}", :class=>"message #{k}") do %> <%= link_to_function(manage_icon('delete'), "$(this).parent('div.message').hide()", :class=>"close") %> <%= v %> <% end %> <% end %>