mirror of
https://github.com/System-End/cdn.git
synced 2026-04-19 16:18:17 +00:00
back
This commit is contained in:
parent
aa615790f4
commit
11a5ab331a
1 changed files with 2 additions and 2 deletions
|
|
@ -42,9 +42,9 @@ class UploadsController < ApplicationController
|
|||
authorize @upload
|
||||
|
||||
@upload.destroy!
|
||||
redirect_to uploads_path, notice: "Upload deleted successfully."
|
||||
redirect_back fallback_location: uploads_path, notice: "Upload deleted successfully."
|
||||
rescue Pundit::NotAuthorizedError
|
||||
redirect_to uploads_path, alert: "You are not authorized to delete this upload."
|
||||
redirect_back fallback_location: uploads_path, alert: "You are not authorized to delete this upload."
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue