~cytrogen/masto-fe

ref: 937dc42f101be905e3af41b879901a4445b0223a masto-fe/app/controllers/admin/site_uploads_controller.rb -rw-r--r-- 414 bytes
937dc42f — Matt Jankowski Extract methods for file movement in `CLI::Upgrade` (#25120) 2 years ago
                                                                                
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