From 451920adc7ae3508fc04b17f34f89bd818b23958 Mon Sep 17 00:00:00 2001 From: Joseph Hale Date: Mon, 2 Mar 2026 15:25:11 -0700 Subject: [PATCH] Include concrete example motivating this module file --- lib/rails_ext/active_storage_analyze_job_skip_detached.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/rails_ext/active_storage_analyze_job_skip_detached.rb b/lib/rails_ext/active_storage_analyze_job_skip_detached.rb index e48154652..0df49f0cf 100644 --- a/lib/rails_ext/active_storage_analyze_job_skip_detached.rb +++ b/lib/rails_ext/active_storage_analyze_job_skip_detached.rb @@ -1,5 +1,6 @@ -# Skip analysis for blobs whose attachments have already been destroyed. Avoids -# Aws::S3::Errors::NoSuchKey when an upload is deleted before AnalyzeJob runs. +# Skip analysis for blobs whose attachments have already been destroyed. +# e.g. when a user uploads a file but deletes it before the analysis runs. +# Avoids `Aws::S3::Errors::NoSuchKey` when an upload is deleted before AnalyzeJob runs. module ActiveStorageAnalyzeJobSkipDetached def perform(blob) return unless blob.attachments.exists?