Class: Upgrade::BackfillImageDerivatives

Inherits:
BackfillDerivativesBase
  • Object
show all
Defined in:
app/jobs/upgrade/backfill_image_derivatives.rb

Instance Method Summary collapse

Instance Method Details

#apply(modelfile) ⇒ Object



12
13
14
15
16
17
18
19
# File 'app/jobs/upgrade/backfill_image_derivatives.rb', line 12

def apply(modelfile)
  status[:step] = "jobs.upgrade.backfill_image_derivatives.processing" # i18n-tasks-use t('jobs.upgrade.backfill_image_derivatives.processing')
  status[:message_variables] = {
    filename: modelfile.filename,
    model_name: modelfile.model.name
  }
  super
end

#derivative ⇒ Object



8
9
10
# File 'app/jobs/upgrade/backfill_image_derivatives.rb', line 8

def derivative
  "preview"
end

#mime_types ⇒ Object



4
5
6
# File 'app/jobs/upgrade/backfill_image_derivatives.rb', line 4

def mime_types
  MediaType.image_types.without(Mime[:svg])
end