Created
October 21, 2014 16:31
-
-
Save coreyjs/a0e7472b1485a165e2d6 to your computer and use it in GitHub Desktop.
Display Rails Flash Messages
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
<% flash.each do |name, msg| %> | |
<% if msg.class == Array %> | |
<% msg.each do |message| %> | |
<%= content_tag :div, message, :id => "flash_#{name}" %> | |
<% end %> | |
<% else %> | |
<%= content_tag :div, msg, :id => "flash_#{name}" %> | |
<% end %> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment