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:
parent
ac26aef11f
commit
91d6c6e889
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue