app/views/application/_flashes.html.erb
<% if flash[:notice] %>
<div class="alert alert-primary alert-dismissible fade show" role="alert">
<%= notice %>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<% end %>
<% if flash[:alert] %>
<div class="alert alert-warning alert-dismissible fade show" role="alert">
<%= alert %>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<% end %>