const_defined?小错误
This commit is contained in:
parent
02e83ea776
commit
27e123f9fd
|
@ -33,7 +33,7 @@ class Mailer < ActionMailer::Base
|
|||
@target = cls
|
||||
end
|
||||
def method_missing(name, *args, &block)
|
||||
if Setting.delayjob_enabled && Object.const_defined?('Delayed::Worker')
|
||||
if Setting.delayjob_enabled && Object.const_defined?('Delayed')
|
||||
@target.delay.send(name, *args, &block)
|
||||
else
|
||||
@target.send(name, *args, &block).deliver
|
||||
|
|
Loading…
Reference in New Issue