Skip to content

Instantly share code, notes, and snippets.

@gringocl
Created January 28, 2014 20:31
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gringocl/8675704 to your computer and use it in GitHub Desktop.
Save gringocl/8675704 to your computer and use it in GitHub Desktop.
Rails flash message integration with zurb foundation snippet
<% flashes = {notice: 'success', alert: 'standard', error: 'alert', secondary: 'info'} %>
<% flashes.each do |key, value| %>
<% if flash[key] %>
<%= content_tag :div, :data => { :alert => '' }, :class => "alert-box #{value} radius" do %>
<%= flash[key] %>
<%= link_to '&times;'.html_safe, '#', :class => 'close'%>
<% end %>
<% end %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment