Skip to content

Instantly share code, notes, and snippets.

@dentedtriangle
Created July 4, 2012 10:27
Show Gist options
  • Save dentedtriangle/3046614 to your computer and use it in GitHub Desktop.
Save dentedtriangle/3046614 to your computer and use it in GitHub Desktop.
Ruby Flash Messages
- flash.each do |name, msg|
%div{:class => "alert alert-#{name == :notice ? "success" : "error"}"}
%a.close{"data-dismiss" => "alert"} ×
= content_tag :div, msg, :id => "flash_#{name}" if msg.is_a?(String)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment