Handle flash messages that are not arrays (#895)
This commit is contained in:
parent
cfda390845
commit
7c4396d535
1 changed files with 5 additions and 0 deletions
|
|
@ -13,6 +13,7 @@
|
|||
<% unless flash[:alert].blank? %>
|
||||
<div class="error-notice">
|
||||
Something went wrong:
|
||||
<% if flash[:alert].is_a?(Array) %>
|
||||
<ul>
|
||||
<% flash[:alert].each do |error| %>
|
||||
<li>
|
||||
|
|
@ -20,6 +21,10 @@
|
|||
</li>
|
||||
<% end %>
|
||||
</ul>
|
||||
<% else %>
|
||||
<%= flash[:alert] %>
|
||||
<br>
|
||||
<% end %>
|
||||
Please try again below, or contact <a href="mailto:yo@dev.to">yo@dev.to</a> if this persists.
|
||||
</div>
|
||||
<% end %>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue