Skip to content

Instantly share code, notes, and snippets.

@rlmattax
Created October 24, 2011 20:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rlmattax/1310010 to your computer and use it in GitHub Desktop.
Save rlmattax/1310010 to your computer and use it in GitHub Desktop.
module ApplicationHelper
FLASH_TYPES = [:notice, :error ]
def flash_messages
res = ""
FLASH_TYPES.each do |type|
res += content_tag(:div, flash[type], :class=>[type,"notification", "rounded-corners"]) if flash[type]
end
raw(res)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment