add proper flash messages

This commit is contained in:
2022-12-05 10:57:34 +02:00
parent f5d53b6d1c
commit d10361f13d
7 changed files with 51 additions and 17 deletions

View File

@ -13,7 +13,9 @@ module Merged
button( text , url , "bg-green-500" )
end
def submit_button(text , danger = false )
clazz = danger ? "bg-blue-500 " : "bg-blue-500 " + button_classes
clazz = "bg-blue-500 " #full names, no tricks for tailwind
clazz = "bg-red-500 " if danger
clazz += button_classes
content_tag(:button , class: clazz , type: :submit) do
text
end