Remove document cached_attachment value after destroy_upload action.
This commit is contained in:
committed by
Bertocq
parent
630a3252b7
commit
6e3f9f9b32
@@ -48,6 +48,7 @@ class DocumentsController < ApplicationController
|
||||
def destroy_upload
|
||||
@document = Document.new(cached_attachment: params[:path])
|
||||
@document.set_attachment_from_cached_attachment
|
||||
@document.cached_attachment = nil
|
||||
@document.documentable = @documentable
|
||||
|
||||
if @document.attachment.destroy
|
||||
|
||||
Reference in New Issue
Block a user