Created
October 17, 2014 13:59
-
-
Save jcieslar/ac5059ba786e550b1765 to your computer and use it in GitHub Desktop.
alert class - rails helper
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
def alert_class(key) | |
case key | |
when 'notice' | |
'notice-class foo bar' | |
when 'error' | |
'error bar' | |
end | |
enb |
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 |key ,msg| | |
.new-alert class="#{alert_class(key)}" | |
.new-alert__close |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment