From ee2b87aedffc5894854bdc5356840260502365b7 Mon Sep 17 00:00:00 2001 From: Angel Perez Date: Tue, 7 Aug 2018 17:24:51 -0400 Subject: [PATCH] Use `.where` clause first when calling `.destroy_all` method --- .../admin/site_customization/information_texts_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/site_customization/information_texts_controller.rb b/app/controllers/admin/site_customization/information_texts_controller.rb index 277ec91a6..85e765cb4 100644 --- a/app/controllers/admin/site_customization/information_texts_controller.rb +++ b/app/controllers/admin/site_customization/information_texts_controller.rb @@ -46,7 +46,7 @@ class Admin::SiteCustomization::InformationTextsController < Admin::SiteCustomiz .keys languages_to_delete.each do |locale| - I18nContentTranslation.destroy_all(locale: locale) + I18nContentTranslation.where(locale: locale).destroy_all end end