Files
docuseal/app/controllers/templates_restore_controller.rb
T
2026-06-24 19:29:07 +03:00

16 lines
382 B
Ruby

# frozen_string_literal: true
class TemplatesRestoreController < ApplicationController
load_and_authorize_resource :template
def create
authorize!(:destroy, @template)
@template.update!(archived_at: nil)
WebhookUrls.enqueue_events(@template, 'template.updated')
redirect_to template_path(@template), notice: I18n.t('template_has_been_unarchived')
end
end