Class: ActiveStorage::PreviewImageJob

Inherits:
BaseJob
  • Object
show all
Defined in:
app/jobs/active_storage/preview_image_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(blob, variations) ⇒ Object



9
10
11
12
13
14
15
# File 'app/jobs/active_storage/preview_image_job.rb', line 9

def perform(blob, variations)
  blob.preview({}).processed

  variations.each do |transformations|
    blob.preprocessed(transformations)
  end
end