From 966b5b19ba9beac97290b0409c9772bf190c8d2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sen=C3=A9n=20Rodero=20Rodr=C3=ADguez?= Date: Fri, 7 Jun 2019 16:55:57 +0200 Subject: [PATCH] Mark all translations that do not exist for destruction When a translation not exists yet we can mark them all for destruction by default. They already should be initialized correctly from database or via nested attributes. --- app/helpers/translatable_form_helper.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/helpers/translatable_form_helper.rb b/app/helpers/translatable_form_helper.rb index 807fa8d6f..cfe37e490 100644 --- a/app/helpers/translatable_form_helper.rb +++ b/app/helpers/translatable_form_helper.rb @@ -64,9 +64,7 @@ module TranslatableFormHelper def new_translation_for(locale) @object.translations.new(locale: locale).tap do |translation| - unless locale == I18n.locale && no_other_translations?(translation) - translation.mark_for_destruction - end + translation.mark_for_destruction end end