Partial for new flash code

This commit is contained in:
Kyle Drake 2017-03-03 20:37:54 -08:00
parent ae1f3a81e3
commit 8d5a1e95f1

15
views/_flash.erb Normal file
View file

@ -0,0 +1,15 @@
<% if @error %>
<div class="alert alert-block alert-error">
<p><%== @error %></p>
</div>
<% end %>
<% if flash.keys.length > 0 %>
<div class="alert alert-block alert-<%= flash.keys.first %> <%= opts[:centered] ? 'txt-Center' : '' %>">
<p>
<% flash.keys.each do |key| %>
<%== flash[key] %>
<% end %>
</p>
</div>
<% end %>