From 8e8f09fa187ad8b4567b68361e644a334741a7a0 Mon Sep 17 00:00:00 2001 From: Dwight Watson Date: Thu, 22 Mar 2018 14:16:36 +1100 Subject: Flip the order of the after_create callbacks Addresses rails/rails#32247 Add test that checks identify and analyze work in correct order Break out direct upload test helper Review changes for direct-upload test helper --- activestorage/app/models/active_storage/attachment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activestorage/app/models/active_storage') diff --git a/activestorage/app/models/active_storage/attachment.rb b/activestorage/app/models/active_storage/attachment.rb index 19f48c57d6..c59877a9a5 100644 --- a/activestorage/app/models/active_storage/attachment.rb +++ b/activestorage/app/models/active_storage/attachment.rb @@ -14,7 +14,7 @@ class ActiveStorage::Attachment < ActiveRecord::Base delegate_missing_to :blob - after_create_commit :identify_blob, :analyze_blob_later + after_create_commit :analyze_blob_later, :identify_blob # Synchronously purges the blob (deletes it from the configured service) and destroys the attachment. def purge -- cgit v1.2.3