Integre mensagens de alerta / aviso flash do Rails no alerta descartável do Bootstrap 3

<% 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'>&times;</span>
</button>
<%= value %>
</div>
<% end %>
</div>
</div>
</div>
<% end %>