Sha256: 0856fc145cb928998d498625d8ecd23457f44234fb2726e365f3a71966574c72
Contents?: true
Size: 674 Bytes
Versions: 1
Compression:
Stored size: 674 Bytes
Contents
# encoding: utf-8 module CarrierWave module Workers class ProcessAsset < Struct.new(:klass, :id, :column) @queue = :process_asset def self.perform(*args) new(*args).perform end def perform resource = klass.is_a?(String) ? klass.constantize : klass record = resource.find id if record 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 end # ProcessAsset end # Workers end # Backgrounder
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
carrierwave_backgrounder-0.0.7 | lib/backgrounder/workers/process_asset.rb |