Skip to content

Commit

Permalink
Fix flash messages coloring
Browse files Browse the repository at this point in the history
Previously, all flash messages were showing with the same (black)
background. Internally, the flash object converts and stores keys
as strings [1].

[1] https://github.com/rails/rails/blob/main/actionpack/lib/action_dispatch/middleware/flash.rb#L163
  • Loading branch information
spaghetticode committed Mar 6, 2024
1 parent 7d380c9 commit 991a179
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion admin/app/views/layouts/solidus_admin/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

<div class="fixed inset-x-0 bottom-3 flex items-center justify-center flex-col gap-3 pointer-events-none" role="alert">
<% flash.each do |key, message| %>
<%= render component("ui/toast").new(text: message, scheme: key == :error ? :error : :default) %>
<%= render component("ui/toast").new(text: message, scheme: key.to_sym == :error ? :error : :default) %>
<% end %>
</div>
</body>
Expand Down

0 comments on commit 991a179

Please sign in to comment.