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.

21 lines
419 B

  1. # frozen_string_literal: true
  2. module Admin
  3. class SiteUploadsController < BaseController
  4. before_action :set_site_upload
  5. def destroy
  6. authorize :settings, :destroy?
  7. @site_upload.destroy!
  8. redirect_to edit_admin_settings_path, notice: I18n.t('admin.site_uploads.destroyed_msg')
  9. end
  10. private
  11. def set_site_upload
  12. @site_upload = SiteUpload.find(params[:id])
  13. end
  14. end
  15. end