Sha256: 1b9075e72b20059682ebb63dd3ab51064b6114226c635fc2bc09dab4992a6bbf
Contents?: true
Size: 446 Bytes
Versions: 2
Compression:
Stored size: 446 Bytes
Contents
class ActiveRecordWorker # Public: perform. # # klass_name - name of the class (string). # method - method name, this method will be called on the object. # *args - array of arguments to send to the method # def self.perform(klass, id, method, *args) args = ResquePerformLater.args_from_resque(args) runner_klass = eval(klass) record = runner_klass.where(:id => id).first record.send(method, *args) if record end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
perform_later-0.0.4 | lib/active_record_worker.rb |
perform_later-0.0.3 | lib/active_record_worker.rb |