allow to permanently delete template in the cloud

This commit is contained in:
Pete Matsyburka committed 2023-11-27 20:25:11 +02:00
1 parent 13f76c9944
commit 342d29f272
2 files changed
+6 -4

No files matched your search

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