Class: Attached::Job
- Inherits:
-
Object
- Object
- Attached::Job
- Defined in:
- lib/attached/job.rb
Class Method Summary collapse
Class Method Details
.enqueue(attachment) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/attached/job.rb', line 15 def self.enqueue() klass = .instance.class.name id = .instance.id method = .name .status = 'processing' end |
.perform(klass, id, method) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/attached/job.rb', line 7 def self.perform(klass, id, method) object = eval(klass).find(id) = object.send(name) .reprocess! .status = 'active' object.save end |