Skip to content

Commit f9edf76

Browse files
authored
Merge pull request #2444 from mikej/refine-flash-message-markup
Remove unnecessary use of content_tag in flash messages partial
2 parents 761ceaa + b6fe364 commit f9edf76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/views/layouts/_messages.html.haml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
- name = name.eql?('notice') ? 'info' : name
44
- if msg.is_a?(String)
55
.alert.alert-dismissible.fade.show.mb-0{ 'data-alert': '', class: "alert-#{name}", role: 'alert' }
6-
= content_tag :div, msg
6+
%div= msg
77
%button.btn-close{ type: 'button', 'data-bs-dismiss': 'alert', 'aria-label': 'Close' }
88
- elsif msg.is_a?(Array)
99
- msg.each do |message|
1010
.alert.alert-dismissible.fade.show.mb-0{ 'data-alert': '', class: "alert-#{name}", role: 'alert' }
11-
= content_tag :span, message
11+
%span= message
1212
%button.btn-close{ type: 'button', 'data-bs-dismiss': 'alert', 'aria-label': 'Close' }
1313

0 commit comments

Comments
 (0)