Skip to content

Instantly share code, notes, and snippets.

@ordinaryzelig
Created October 31, 2010 01:00
Show Gist options
  • Save ordinaryzelig/655953 to your computer and use it in GitHub Desktop.
Save ordinaryzelig/655953 to your computer and use it in GitHub Desktop.
# app/helpers/application_helper.rb
def update_flash
[:notice, :error].each do |type|
message = flash[type]
concat "$('#flash_#{type}').html('message')"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment