1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Return to same level of abstraction

This commit is contained in:
David Heinemeier Hansson 2017-07-23 16:28:45 -05:00
parent ac26aef11f
commit 91d6c6e889

View file

@ -10,7 +10,7 @@ class ActiveStorage::Variant
end
def processed
process unless service.exist?(key)
process unless processed?
self
end
@ -24,6 +24,10 @@ class ActiveStorage::Variant
private
def processed?
service.exist?(key)
end
def process
service.upload key, transform(service.download(blob.key))
end