Integrate Rails flash alert/notice messages into Bootstrap 3 dismissible alert
<% unless flash.blank? %>
<div class='row'>
<div class='col-sm-12'>
<div id='flash'>
<% flash.each do |key, value| %>
<div class='flash alert alert-dismissible fade in alert-<%= key == 'notice' ? 'info' : 'danger' %>'>
<button type='button' class='close' data-dismiss='alert' aria-label='Close'>
<span aria-hidden='true'>×</span>
</button>
<%= value %>
</div>
<% end %>
</div>
</div>
</div>
<% end %>
Written by Arthur
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#