我正在使用依赖于ActionMailer的gem(Devise):
https://github.com/plataformatec/devise/blob/master/app/mailers/devise/mailer.rb#L5-15
我希望它使用PostageApp:Mailer而不是ActionMailer。但我们不知道如何改变,因为它是在宝石内部。我们不想打破宝石,所以有没有办法通过使用库在我们的应用程序中进行更改?
答案 0 :(得分:1)
我必须覆盖整个邮件程序类:http://help.postageapp.com/discussions/support/176-how-can-i-make-the-devisemailer-a-subclass-of-postageapp
答案 1 :(得分:0)
此人认为您可能需要做的就是实现与ActionMailer相同的方法,它可能会起作用: http://groups.google.com/group/plataformatec-devise/browse_thread/thread/e048dd5d9a0d1d5f/70f02d5bd67f1271
更多信息: https://github.com/plataformatec/devise/blob/master/app/mailers/devise/mailer.rb#L5-15