2023-09-15 00:42:51 +03:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
|
|
class TemplatesRestoreController < ApplicationController
|
2023-09-17 00:45:57 +03:00
|
|
|
load_and_authorize_resource :template
|
2023-09-15 00:42:51 +03:00
|
|
|
|
2023-09-17 00:45:57 +03:00
|
|
|
def create
|
2023-12-30 00:37:03 +02:00
|
|
|
@template.update!(archived_at: nil)
|
2023-09-15 00:42:51 +03:00
|
|
|
|
2023-09-17 00:45:57 +03:00
|
|
|
redirect_to template_path(@template), notice: 'Template has been unarchived'
|
2023-09-15 00:42:51 +03:00
|
|
|
end
|
|
|
|
|
end
|