Skip to content

Instantly share code, notes, and snippets.

@gabriel403
Created December 14, 2013 15:02
Show Gist options
  • Save gabriel403/7960271 to your computer and use it in GitHub Desktop.
Save gabriel403/7960271 to your computer and use it in GitHub Desktop.
module FlashMessageHelper
def flash_message
html = ""
flash.each do |key, msg|
skey = key
if key == "notice"
skey = 'info'
end
html << (content_tag :div, msg, :class => "flash #{key} alert alert-#{skey}")
end
html.html_safe
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment