4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# File 'app/controllers/awesome_translations/clean_ups_controller.rb', line 4
def create
ids = []
params[:c].each do |translation_value_id, check_value|
ids << translation_value_id.to_i if check_value == "1"
end
translation_values = AwesomeTranslations::CacheDatabaseGenerator::TranslationValue
.where(id: ids)
translation_values.each do |translation_value|
AwesomeTranslations::TranslationMigrator.new(translation_value: translation_value).execute
translation_value.destroy!
end
redirect_to [:new, :clean_up]
end
|