Sha256: 35764f184928a7ffb4b4566a99697f0c5da189c1fe7eea1c9d93639dc9c682ab

Contents?: true

Size: 479 Bytes

Versions: 3

Compression:

Stored size: 479 Bytes

Contents

# encoding: utf-8
module CarrierWave
  module Workers

    class ProcessAsset < Struct.new(:klass, :id, :column)
  
      def perform
        record = klass.find id
        record.send(:"process_#{column}_upload=", true)
        if record.send(:"#{column}").recreate_versions! && record.respond_to?(:"#{column}_processing")
          record.update_attribute :"#{column}_processing", nil
        end
      end
      
    end # ProcessAsset
    
  end # Workers
end # Backgrounder

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
carrierwave_backgrounder-0.0.5 lib/backgrounder/workers/process_asset.rb
carrierwave_backgrounder-0.0.4 lib/backgrounder/workers/process_asset.rb
carrierwave_backgrounder-0.0.3 lib/backgrounder/workers/process_asset.rb