delayed_job条件错误

This commit is contained in:
guange 2015-04-29 23:17:24 +08:00
parent e6f8610dea
commit 8384eff7f2
1 changed files with 1 additions and 1 deletions

View File

@ -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')
if Setting.delayjob_enabled? && Object.const_defined?('Delayed')
@target.delay.send(name, *args, &block)
else
@target.send(name, *args, &block).deliver