Fix linting issue

This commit is contained in:
Claire
2026-03-02 18:59:32 +01:00
parent 54cfc49b42
commit d2f5feb25f
2 changed files with 11 additions and 1 deletions

View File

@@ -53,6 +53,16 @@ module SettingsHelper
end
end
def default_content_type_label(content_type)
variant = content_type.split('/')[1]
safe_join(
[
t("simple_form.labels.defaults.setting_default_content_type_#{variant}"),
content_tag(:span, t("simple_form.hints.defaults.setting_default_content_type_#{variant}"), class: 'hint'),
]
)
end
private
def links_for_featured_tags(tags)

View File

@@ -57,7 +57,7 @@
wrapper: :with_label,
label: I18n.t('simple_form.labels.defaults.setting_default_content_type'),
include_blank: false,
label_method: ->(item) { safe_join([t("simple_form.labels.defaults.setting_default_content_type_#{item.split('/')[1]}"), content_tag(:span, t("simple_form.hints.defaults.setting_default_content_type_#{item.split('/')[1]}"), class: 'hint')]) },
label_method: ->(item) { default_content_type_label(item) },
required: false,
as: :radio_buttons,
collection_wrapper_tag: 'ul',