Skip to content

Instantly share code, notes, and snippets.

@xuncheng
Created July 15, 2013 09:53
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save xuncheng/5998779 to your computer and use it in GitHub Desktop.
Rails flash messages using bootstrap
- flash.each do |name, msg|
- if msg.is_a?(String)
%div{:class => "alert alert-#{name == :notice ? "success" : "error"}"}
%a.close{"data-dismiss" => "alert"} ×
= content_tag :div, msg, :id => "flash_#{name}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment