iagopiimenta/activestorage_legacy

View on GitHub
app/jobs/active_storage/purge_attachment_worker.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
require 'sidekiq'

class ActiveStorage::PurgeAttachmentWorker
  include Sidekiq::Worker

  def perform(attachment_id)
    ActiveStorage::Attachment.where(id: attachment_id).first&.purge
  end
end