Files
timeoverflow/app/helpers/active_admin_helper.rb
2023-04-01 21:59:10 +02:00

9 lines
262 B
Ruby

module ActiveAdminHelper
def render_translations(attribute, joiner = " | ")
attribute.map do |locale, translation|
tag.strong("#{I18n.t("locales.#{locale}", locale: locale)}: ") +
tag.span(translation)
end.join(joiner).html_safe
end
end