allow to permanently delete template in the cloud

This commit is contained in:
Pete Matsyburka
2023-11-27 18:42:34 +02:00
parent 13f76c9944
commit 342d29f272
2 changed files with 6 additions and 4 deletions
+3 -1
View File
@@ -58,9 +58,11 @@ class TemplatesController < ApplicationController
def destroy
notice =
if !Docuseal.multitenant? && params[:permanently].present?
if params[:permanently].present?
@template.destroy!
Rollbar.info("Remove template: #{@template.id}") if defined?(Rollbar)
'Template has been removed.'
else
@template.update!(deleted_at: Time.current)