adjust permanently remove

pull/414/head
Pete Matsyburka 11 months ago
parent 48a82b1d49
commit 35a2aba887

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

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

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

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

Loading…
Cancel
Save