Created
July 15, 2013 09:52
-
-
Save xuncheng/5998767 to your computer and use it in GitHub Desktop.
Rails flash messages using bootstrap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% flash.each do |name, msg| %> | |
<% if msg.is_a?(String) %> | |
<div class="alert alert-<%= name == :notice ? "success" : "error" %>"> | |
<a class="close" data-dismiss="alert">×</a> | |
<%= content_tag :div, msg, :id => "flash_#{name}" %> | |
</div> | |
<% end %> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment