You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
425 B

7 years ago
<div id="flash" class="container">
<% [:danger, :warning, :success, :info].each do |level|
message = flash[level]
unless message.nil? %>
<%= content_tag :div, class: %(alert alert-#{level}) do %>
<% if message.is_a? Enumerable %>
<ul>
<% message.each do |m| %>
<li><%= m %></li>
<% end %>
</ul>
<% else %>
<%= message %>
<% end %>
<% end
end
end %>
</div>