Skip to content

Instantly share code, notes, and snippets.

@9876691
Created March 2, 2010 16:02
Show Gist options
  • Save 9876691/319607 to your computer and use it in GitHub Desktop.
Save 9876691/319607 to your computer and use it in GitHub Desktop.
def flash_helper
f_names = [:notice, :warning, :message]
fl = ''
for name in f_names
if flash[name]
fl = fl + "<div class=\"notice\">#{flash[name]}</div>"
end
flash[name] = nil;
end
return fl
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment