Created
October 6, 2014 13:46
-
-
Save aravindgd/9b46f8cdf4aff189c736 to your computer and use it in GitHub Desktop.
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
module ApplicationHelper | |
def bootstrap_class_for(flash_type) | |
case flash_type | |
when "success" | |
"alert-success" # Green | |
when "error" | |
"alert-danger" # Red | |
when "alert" | |
"alert-warning" # Yellow | |
when "notice" | |
"alert-info" # Blue | |
else | |
flash_type.to_s | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
%div{:class => "alert #{bootstrap_class_for(type)} alert-dismissable fade in"}
%button.close{"aria-hidden" => "true", "data-dismiss" => "alert", :type => "button"} ×
= message