about summary refs log tree commit diff
path: root/app/controllers/admin/site_uploads_controller.rb
blob: a5d2cf41cf121d6c620cac9fcc208d2316b5772d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# frozen_string_literal: true

module Admin
  class SiteUploadsController < BaseController
    before_action :set_site_upload

    def destroy
      authorize :settings, :destroy?

      @site_upload.destroy!

      redirect_to admin_settings_path, notice: I18n.t('admin.site_uploads.destroyed_msg')
    end

    private

    def set_site_upload
      @site_upload = SiteUpload.find(params[:id])
    end
  end
end