2020-03-08 15:00:24 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Admin
|
|
|
|
class SiteUploadsController < BaseController
|
|
|
|
before_action :set_site_upload
|
|
|
|
|
|
|
|
def destroy
|
|
|
|
authorize :settings, :destroy?
|
|
|
|
|
|
|
|
@site_upload.destroy!
|
|
|
|
|
2024-05-06 13:31:39 +00:00
|
|
|
redirect_back fallback_location: admin_settings_path, notice: I18n.t('admin.site_uploads.destroyed_msg')
|
2020-03-08 15:00:24 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def set_site_upload
|
|
|
|
@site_upload = SiteUpload.find(params[:id])
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|