Change rule translation interface to display english name and populate empty translations (#35170)
This commit is contained in:
parent
72f2f35bfb
commit
0a7418e6d8
4 changed files with 9 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue