We are using acts_as_paranoid.
It does the following thing.
The first time destroy is called, it sets deleted_at. The second time it is called, it deletes the active record.
I am thinking about how to integrate this behavior with Shrine. Delete the S3 objects after the second, real destroy. Has anyone tried such a thing?
I was looking at https://shrinerb.com/docs/plugins/activerecord#after-destroy
but it says:
Attacher#activerecord_before_save Attacher#activerecord_after_save Attacher#activerecord_after_destroy
But I can not see what Attacher is. I have only the ImageUploader::Attachment in my record.
I do have
class ImageUploader < Shrine
class ContentPicture < ApplicationRecord include ImageUploader::Attachment(:image) # adds an `image` virtual attribute
But the method activerecord_before_save is never called
class ImageUploader < Shrine def activerecord_before_save # never gets called end end