From b6fe3640a1a853a4080f06257d5b0999a4d03d6b Mon Sep 17 00:00:00 2001 From: Michael Josephson <30024+mikej@users.noreply.github.com> Date: Thu, 22 Jan 2026 11:03:56 +0000 Subject: [PATCH] remove unnecessary use of content_tag small improvement to the partial used for flash messages that was suggested in the review comments for #2442 --- app/views/layouts/_messages.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/layouts/_messages.html.haml b/app/views/layouts/_messages.html.haml index 9f0df4b93..ac36e36ed 100644 --- a/app/views/layouts/_messages.html.haml +++ b/app/views/layouts/_messages.html.haml @@ -3,11 +3,11 @@ - name = name.eql?('notice') ? 'info' : name - if msg.is_a?(String) .alert.alert-dismissible.fade.show.mb-0{ 'data-alert': '', class: "alert-#{name}", role: 'alert' } - = content_tag :div, msg + %div= msg %button.btn-close{ type: 'button', 'data-bs-dismiss': 'alert', 'aria-label': 'Close' } - elsif msg.is_a?(Array) - msg.each do |message| .alert.alert-dismissible.fade.show.mb-0{ 'data-alert': '', class: "alert-#{name}", role: 'alert' } - = content_tag :span, message + %span= message %button.btn-close{ type: 'button', 'data-bs-dismiss': 'alert', 'aria-label': 'Close' }