diff --git a/app/models/mailer.rb b/app/models/mailer.rb index 7a6061835..919e5bb00 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -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