Created
March 13, 2012 19:41
-
-
Save rsanheim/2031087 to your computer and use it in GitHub Desktop.
Simple Flash Helper to display any flashes in a class
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 FlashHelper | |
# Output a series of divs with the class being the flash type, and the content being the flash message | |
def render_flashes | |
flash.inject(String.new.html_safe) do |html, (key, value)| | |
content_tag(:div, value, :class => key) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment