adjust permanently remove

This commit is contained in:
Pete Matsyburka
2024-12-13 13:31:54 +02:00
parent 48a82b1d49
commit 35a2aba887
4 changed files with 4 additions and 4 deletions
@@ -93,7 +93,7 @@ module Api
end
def destroy
if params[:permanently] == 'true'
if params[:permanently].in?(['true', true])
@submission.destroy!
else
@submission.update!(archived_at: Time.current)
+1 -1
View File
@@ -74,7 +74,7 @@ module Api
end
def destroy
if params[:permanently] == 'true'
if params[:permanently].in?(['true', true])
@template.destroy!
else
@template.update!(archived_at: Time.current)
+1 -1
View File
@@ -61,7 +61,7 @@ class SubmissionsController < ApplicationController
def destroy
notice =
if params[:permanently].present?
if params[:permanently].in?(['true', true])
@submission.destroy!
I18n.t('submission_has_been_removed')
+1 -1
View File
@@ -93,7 +93,7 @@ class TemplatesController < ApplicationController
def destroy
notice =
if params[:permanently].present?
if params[:permanently].in?(['true', true])
@template.destroy!
I18n.t('template_has_been_removed')