mirror of
https://github.com/System-End/cdn.git
synced 2026-04-19 22:05:13 +00:00
19 lines
373 B
Ruby
19 lines
373 B
Ruby
# frozen_string_literal: true
|
|
|
|
module Admin
|
|
class UploadsController < ApplicationController
|
|
before_action :set_upload
|
|
|
|
def destroy
|
|
filename = @upload.filename
|
|
@upload.destroy!
|
|
redirect_to admin_search_path, notice: "Upload #{filename} deleted."
|
|
end
|
|
|
|
private
|
|
|
|
def set_upload
|
|
@upload = Upload.find(params[:id])
|
|
end
|
|
end
|
|
end
|