Change rule translation interface to display english name and populate empty translations (#35170)

This commit is contained in:
Claire 2025-06-25 12:02:19 +02:00 committed by GitHub
commit 0a7418e6d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 9 additions and 2 deletions

View file

@ -17,6 +17,9 @@ module Admin
def edit
authorize @rule, :update?
missing_languages = RuleTranslation.languages - @rule.translations.pluck(:language)
missing_languages.each { |lang| @rule.translations.build(language: lang) }
end
def create