adjust permanently remove
This commit is contained in:
@@ -93,7 +93,7 @@ module Api
|
|||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
if params[:permanently] == 'true'
|
if params[:permanently].in?(['true', true])
|
||||||
@submission.destroy!
|
@submission.destroy!
|
||||||
else
|
else
|
||||||
@submission.update!(archived_at: Time.current)
|
@submission.update!(archived_at: Time.current)
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ module Api
|
|||||||
end
|
end
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
if params[:permanently] == 'true'
|
if params[:permanently].in?(['true', true])
|
||||||
@template.destroy!
|
@template.destroy!
|
||||||
else
|
else
|
||||||
@template.update!(archived_at: Time.current)
|
@template.update!(archived_at: Time.current)
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ class SubmissionsController < ApplicationController
|
|||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
notice =
|
notice =
|
||||||
if params[:permanently].present?
|
if params[:permanently].in?(['true', true])
|
||||||
@submission.destroy!
|
@submission.destroy!
|
||||||
|
|
||||||
I18n.t('submission_has_been_removed')
|
I18n.t('submission_has_been_removed')
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ class TemplatesController < ApplicationController
|
|||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
notice =
|
notice =
|
||||||
if params[:permanently].present?
|
if params[:permanently].in?(['true', true])
|
||||||
@template.destroy!
|
@template.destroy!
|
||||||
|
|
||||||
I18n.t('template_has_been_removed')
|
I18n.t('template_has_been_removed')
|
||||||
|
|||||||
Reference in New Issue
Block a user