mirror of
https://github.com/we-promise/sure.git
synced 2026-04-25 23:14:10 +00:00
Fix TradeRepublic review issues and Brakeman warning
This commit is contained in:
15
app/views/shared/_flash.html.erb
Normal file
15
app/views/shared/_flash.html.erb
Normal file
@@ -0,0 +1,15 @@
|
||||
<% if flash.any? %>
|
||||
<div id="flash-messages" class="space-y-2">
|
||||
<% flash.each do |type, message| %>
|
||||
<%# Map Rails flash types to Tailwind/Design System classes %>
|
||||
<% css_class = case type.to_sym
|
||||
when :notice then 'bg-success text-on-success'
|
||||
when :alert then 'bg-error text-on-error'
|
||||
else 'bg-secondary text-on-secondary'
|
||||
end %>
|
||||
<div class="rounded px-4 py-2 text-sm font-medium <%= css_class %>">
|
||||
<%= message %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user