Fix for flash dumping all keys

This commit is contained in:
Kyle Drake 2017-04-02 12:25:59 -07:00
parent 746f0b48e0
commit cc476e5b15

View file

@ -7,7 +7,7 @@
<% if flash.keys.length > 0 %> <% if flash.keys.length > 0 %>
<div class="alert alert-block alert-<%= flash.keys.first %> <%= opts[:centered] ? 'txt-Center' : '' %>"> <div class="alert alert-block alert-<%= flash.keys.first %> <%= opts[:centered] ? 'txt-Center' : '' %>">
<p> <p>
<% flash.keys.each do |key| %> <% flash.keys.select {|k| [:success, :error, :errors].include?(k)}.each do |key| %>
<%== flash[key] %> <%== flash[key] %>
<% end %> <% end %>
</p> </p>