Skip to content

Instantly share code, notes, and snippets.

@yoonwaiyan
Created August 28, 2015 15:33
Show Gist options
  • Save yoonwaiyan/676868d5befe053d6d6a to your computer and use it in GitHub Desktop.
Save yoonwaiyan/676868d5befe053d6d6a to your computer and use it in GitHub Desktop.
Rails Flash Message Partial for Bootstrap
<% flash.each do |key, value| %>
<% key = "success" if key == "notice" %>
<% key = "danger" if key == "error" %>
<div class="alert alert-<%= key %>">
<button type="button" class="close" data-dismiss="alert">×</button>
<strong><%= value %></strong>
</div>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment