This repository has been archived on 2024-07-22. You can view files and clone it, but cannot push or open issues or pull requests.
2020-03-08 08:00:24 -07:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Admin
|
|
|
|
class SiteUploadsController < BaseController
|
|
|
|
before_action :set_site_upload
|
|
|
|
|
|
|
|
def destroy
|
|
|
|
authorize :settings, :destroy?
|
|
|
|
|
|
|
|
@site_upload.destroy!
|
|
|
|
|
2022-10-22 02:44:41 -07:00
|
|
|
redirect_to admin_settings_path, notice: I18n.t('admin.site_uploads.destroyed_msg')
|
2020-03-08 08:00:24 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def set_site_upload
|
|
|
|
@site_upload = SiteUpload.find(params[:id])
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|