Use .where clause first when calling .destroy_all method

This commit is contained in:
Angel Perez
2018-08-07 17:24:51 -04:00
committed by Julian Herrero
parent 37aa082943
commit ee2b87aedf

View File

@@ -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