Simplify flash message handling - flash.each includes flash.now automatically

This commit is contained in:
Ken Johnson
2025-12-11 13:39:52 +00:00
parent 8c121cab65
commit 6dc7ebac33
+2 -2
View File
@@ -1,9 +1,9 @@
<div class="container-fluid">
<!-- Flash Messages -->
<% if flash.any? || !flash.now.to_hash.empty? %>
<% if flash.any? %>
<div class="row mb-3">
<div class="col-12">
<% (flash.to_hash.merge(flash.now.to_hash)).each do |name, msg| %>
<% flash.each do |name, msg| %>
<%
alert_class = case name.to_sym
when :error, :alert then 'alert-danger'