<% [:success, :notice, :error, :alert].each do |type| %> <%- alert_class = case type when :success then "alert-success" when :notice then "alert-info" when :alert then "alert-warning" when :error then "alert-danger" else "alert-#{type}" end -%> <% if flash[type] %>
<%= flash[type] %> ×
<% end %> <% end %>