Skip to content

Instantly share code, notes, and snippets.

@rsanheim
Created March 13, 2012 19:41
Show Gist options
  • Save rsanheim/2031087 to your computer and use it in GitHub Desktop.
Save rsanheim/2031087 to your computer and use it in GitHub Desktop.
Simple Flash Helper to display any flashes in a class
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