diff options
author | Mike Perham <mperham@gmail.com> | 2014-05-20 08:35:12 -0700 |
---|---|---|
committer | Mike Perham <mperham@gmail.com> | 2014-05-20 08:35:12 -0700 |
commit | b49d3f105f765a2c6c440fad5303a2809942422a (patch) | |
tree | 6db1a67435477849e8d84471013c5ce7672daddf /lib/active_job/queue_adapter.rb | |
parent | 23a87236cc36f3852c07aecad94ae540fa5de3c9 (diff) | |
parent | a8cfb3d042239d968ce0f45e983783f3042ef883 (diff) | |
download | rails-b49d3f105f765a2c6c440fad5303a2809942422a.tar.gz rails-b49d3f105f765a2c6c440fad5303a2809942422a.tar.bz2 rails-b49d3f105f765a2c6c440fad5303a2809942422a.zip |
merge master
Diffstat (limited to 'lib/active_job/queue_adapter.rb')
-rw-r--r-- | lib/active_job/queue_adapter.rb | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/active_job/queue_adapter.rb b/lib/active_job/queue_adapter.rb index 2033f6fe56..8f2f8b86ea 100644 --- a/lib/active_job/queue_adapter.rb +++ b/lib/active_job/queue_adapter.rb @@ -6,14 +6,13 @@ module ActiveJob mattr_reader(:queue_adapter) { ActiveJob::QueueAdapters::InlineAdapter } def queue_adapter=(name_or_adapter) - case name_or_adapter - when Symbol, String - adapter = load_adapter(name_or_adapter) - else - adapter = name_or_adapter - end - - @@queue_adapter = adapter + @@queue_adapter = \ + case name_or_adapter + when Symbol, String + load_adapter(name_or_adapter) + when Class + name_or_adapter + end end private |