Skip to content

Instantly share code, notes, and snippets.

@jessewaites
Created April 22, 2016 17:44
Show Gist options
  • Save jessewaites/e5ccf9ab8ac7c71f45cf1ca6064d8091 to your computer and use it in GitHub Desktop.
Save jessewaites/e5ccf9ab8ac7c71f45cf1ca6064d8091 to your computer and use it in GitHub Desktop.
Rails Flash Messages for Zurb Foundation 5+
<!-- Rails flash messages styled for Zurb Foundation. -->
<!-- Activate with flash.message = "X", flash.alert = "Y" -->
<% flash.each do |name, msg| %>
<% if msg.is_a?(String) %>
<div data-alert style="text-align" class="alert-box <%= name.to_s == 'notice' ? 'success' : 'alert' %>">
<%= content_tag :div, msg %>
<a href="#" class="close">&times;</a>
</div>
<% end %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment