Sha256: a28d3ab56b28fca6f25855bfc1da7e52d198318be4fb5f582f4f4c480ea36bb7
Contents?: true
Size: 458 Bytes
Versions: 13
Compression:
Stored size: 458 Bytes
Contents
module Attached class Job @queue = :attached def self.perform(klass, id, method) object = eval(klass).find(id) attachment = object.send(name) attachment.reprocess! attachment.status = 'active' object.save end def self.enqueue(attachment) klass = attachment.instance.class.name id = attachment.instance.id method = attachment.name attachment.status = 'processing' end end end
Version data entries
13 entries across 13 versions & 1 rubygems