Merge branch 'develop' into 'develop'

邮件不走delay job



See merge request !84
This commit is contained in:
黄井泉 2016-12-23 15:38:17 +08:00
commit c058a0f21e
1 changed files with 5 additions and 5 deletions

View File

@ -34,13 +34,13 @@ class Mailer < ActionMailer::Base
@target = cls
end
def method_missing(name, *args, &block)
if Setting.delayjob_enabled? && Object.const_defined?('Delayed')
# with delayed_job
@target.delay.send(name, *args, &block)
else
# if Setting.delayjob_enabled? && Object.const_defined?('Delayed')
# # with delayed_job
# @target.delay.send(name, *args, &block)
# else
# without delayed_job
@target.send(name, *args, &block).deliver
end
# end
end
end