diff --git a/app/helpers/bootstrap_helper.rb b/app/helpers/bootstrap_helper.rb index d1cda2a0..54278249 100644 --- a/app/helpers/bootstrap_helper.rb +++ b/app/helpers/bootstrap_helper.rb @@ -24,7 +24,7 @@ module BootstrapHelper "#{content_tag(:i, '', class: "fa fa-#{options[:icon]}")} #{body}" end end - unless options[:badge].nil? + if options.has_key?(:badge) || options.dig(:badge_attr, :data)&.has_key?(:controller) badge_class = [ "badge", ("badge-#{options[:badge_color]}" unless options[:badge_color].nil?),