diff options
Diffstat (limited to 'lib/active_job')
-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 |