I noticed that attachments are being removed in an after_destroy callback, which runs within the database transaction, but doesn't seem to need to. ActiveRecord 3.0 added after_commit as a callback, which runs after the transaction completes successfully, and seems to be more appropriate for this situation.
As of now, I'm patching around with the following to do this:
has_attached_file blah blah
skip_callback, :destroy, :after, :destroy_attached_files
after_commit :destroy_attached_files, :on => :destroy
which is working fine. Is there a reason it shouldn't be done this way, that I'm not aware of?
@xxx, is this still an issue with paperclip for you?
Looks like 3.x and 4.x are using after_commit now. I'll close this out.
Thanks for your report, and sorry for the very late response!