I have a model that is using Paperclip to manage the file.
After I delete the model, I obviously would like the file to be deleted as well, but I cannot seem to find out how to get the file deleted using Paperclip.
I have tried self.sourcefile = nil if !sourcefile.dirty?
in the before_destroy
def, but that had no effect.
(I want to be able to have it delete the file locally when I test, and then on S3 when I use that - So i need a pure paperclip solution)
Any ideas?