<% if flash.notice.present? || flash.alert.present? %>
<%= alert('danger') do %> <% Array.wrap(flash.alert).each do |danger| %>

<%= glyphicon('exclamation-sign') %> <%= danger&.html_safe %>

<% end %> <% end %> <%= alert('success') do %> <% Array.wrap(flash.notice).each do |success| %>

<%= glyphicon('ok-sign') %> <%= success&.html_safe %>

<% end %> <% end %>
<% end %>