From eb9b019fee51cff69dfcbf19e6c326c426acc297 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 23 Jul 2017 16:28:45 -0500 Subject: Return to same level of abstraction --- app/models/active_storage/variant.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/active_storage/variant.rb b/app/models/active_storage/variant.rb index 435033f980..002d2bde5b 100644 --- a/app/models/active_storage/variant.rb +++ b/app/models/active_storage/variant.rb @@ -11,7 +11,7 @@ class ActiveStorage::Variant end def processed - process unless service.exist?(key) + process unless processed? self end @@ -25,6 +25,10 @@ class ActiveStorage::Variant private + def processed? + service.exist?(key) + end + def process service.upload key, transform(service.download(blob.key)) end -- cgit v1.2.3