You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
419 B
22 lines
419 B
# frozen_string_literal: true
|
|
|
|
module Admin
|
|
class SiteUploadsController < BaseController
|
|
before_action :set_site_upload
|
|
|
|
def destroy
|
|
authorize :settings, :destroy?
|
|
|
|
@site_upload.destroy!
|
|
|
|
redirect_to edit_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
|