Last active
December 12, 2015 05:39
-
-
Save tombeynon/4723507 to your computer and use it in GitHub Desktop.
Display Rails flash alerts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% [:error, :alert, :notice].each do |key| %> | |
<%= "<div class='message #{key}'>#{flash[key]}</div>".html_safe if flash[key].present? %> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment