Refactor purge pj to be more generic
This commit is contained in:
parent
4013557cd7
commit
ff44b7a600
13 changed files with 82 additions and 143 deletions
|
@ -6,4 +6,11 @@ class AttachmentsController < ApplicationController
|
|||
@attachment = @blob.attachments.find(params[:id])
|
||||
@user_can_upload = params[:user_can_upload]
|
||||
end
|
||||
|
||||
def destroy
|
||||
attachment = @blob.attachments.find(params[:id])
|
||||
@attachment_id = attachment.id
|
||||
attachment.purge_later
|
||||
flash.now.notice = 'La pièce jointe a bien été supprimée.'
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue