Skip to content

Instantly share code, notes, and snippets.

@xuncheng
Created July 15, 2013 09:53
Show Gist options
  • Save xuncheng/5998779 to your computer and use it in GitHub Desktop.
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