diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2016-09-05 09:13:24 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2016-09-05 09:21:10 +0900 |
commit | 0b2197774ccca2a15b01212053143114ee058038 (patch) | |
tree | 80ea0c30741ab76907ab840232fe16aa79e3c504 /activejob/test/jobs | |
parent | 55c5dffd9f2220507ff1a7635c00a81577a8a391 (diff) | |
download | rails-0b2197774ccca2a15b01212053143114ee058038.tar.gz rails-0b2197774ccca2a15b01212053143114ee058038.tar.bz2 rails-0b2197774ccca2a15b01212053143114ee058038.zip |
use `descendants` to get class that inherited `ActiveJob::Base`
`subclasses` get only child classes.
Therefore, if create a job common parent class as `ApplicationJob`,
inherited class does not get properly.
Diffstat (limited to 'activejob/test/jobs')
-rw-r--r-- | activejob/test/jobs/application_job.rb | 4 | ||||
-rw-r--r-- | activejob/test/jobs/inherited_job.rb | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/activejob/test/jobs/application_job.rb b/activejob/test/jobs/application_job.rb new file mode 100644 index 0000000000..4a78b890ec --- /dev/null +++ b/activejob/test/jobs/application_job.rb @@ -0,0 +1,4 @@ +require_relative "../support/job_buffer" + +class ApplicationJob < ActiveJob::Base +end diff --git a/activejob/test/jobs/inherited_job.rb b/activejob/test/jobs/inherited_job.rb new file mode 100644 index 0000000000..60fca66f88 --- /dev/null +++ b/activejob/test/jobs/inherited_job.rb @@ -0,0 +1,5 @@ +require_relative "application_job" + +class InheritedJob < ApplicationJob + self.queue_adapter = :inline +end |