Update tooltip helper to use data-controller instead

This commit is contained in:
Andreas Nedbal 2024-03-10 15:29:10 +01:00 committed by Andreas Nedbal
parent 7f93fabb62
commit 95c79216cb

View file

@ -69,7 +69,7 @@ module BootstrapHelper
end end
def tooltip(body, tooltip_content, placement = "bottom") def tooltip(body, tooltip_content, placement = "bottom")
content_tag(:span, body, { :title => tooltip_content, "data-bs-toggle" => "tooltip", "data-bs-placement" => placement }) content_tag(:span, body, { :title => tooltip_content, "data-controller" => "tooltip", "data-bs-placement" => placement })
end end
def time_tooltip(subject, placement = "bottom") def time_tooltip(subject, placement = "bottom")