2015-09-23 2 views
0

Я пытаюсь использовать Resque :: Mailer на моем NotificationMailerResque почтовик systemSTackerror к глубокому

class NotificationsMailer < MandrillMailer::TemplateMailer 
include Resque::Mailer 

default from: '[email protected]', from_name: 'Alex' 

def create_client to 
    mandrill_mail template: 'beta-sign-up-confirmation', 
       subject: 'create a client', 
       to: to, 
       inline_css: true 
end 
end 

Когда я называю доставить

NotificationsMailer.create_client('[email protected]').deliver 

Я получаю следующую ошибку

SystemStackError: stack level too deep 
from /Users/myname/.rvm/src/rvm/gems/ruby-2.2.2/gems/resque_mailer-2.2.7/lib/resque_mailer.rb:39:in `method_missing' 

ответ

0

Я думаю, вы не можете этого сделать. MandrillMailer::TemplateMailer не является подклассом ActionMailer::Base, что является обязательным требованием для resque_mailer. Точнее, resque_mailer требует совместимости на уровне метода, что не выполняется.