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
425B

  1. <div id="flash" class="container">
  2. <% [:danger, :warning, :success, :info].each do |level|
  3. message = flash[level]
  4. unless message.nil? %>
  5. <%= content_tag :div, class: %(alert alert-#{level}) do %>
  6. <% if message.is_a? Enumerable %>
  7. <ul>
  8. <% message.each do |m| %>
  9. <li><%= m %></li>
  10. <% end %>
  11. </ul>
  12. <% else %>
  13. <%= message %>
  14. <% end %>
  15. <% end
  16. end
  17. end %>
  18. </div>