Displaying 1 result from an estimated 1 matches for "preserve_files".
2012 Jan 25
0
Paperclip preserve files ?
Hi,
I am using paperclip to upload files. The problem I am facing is,
based on my object property I need to preserve my file. Means my object
should be deleted from db but the file need to be restored.
I am using the option :preserve_files => true.
If I keep the above option in model it will be access to all the
objects of the model. I need to restore only for limited objects.
for example
def destroy
if obj.restore_attachment
Paperclip::Attachment.default_options.merge!(:preserve_files
=>true)...