mirror of
https://github.com/docusealco/docuseal.git
synced 2026-06-23 04:10:11 +00:00
16 lines
381 B
Ruby
16 lines
381 B
Ruby
# frozen_string_literal: true
|
|
|
|
class TemplatesRestoreController < ApplicationController
|
|
load_and_authorize_resource :template
|
|
|
|
def create
|
|
authorize!(:update, @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
|