当 config.action_mailer.delivery_method = :test 时,邮件拦截器会被调用吗
这确实是整个问题。我有一些邮件拦截器,但是当我设置传递模式进行测试时,它们不执行其操作 - 这是预期的吗?
config.action_mailer.delivery_method = :test
That's really the whole question. I have some mail interceptors but when I set the delivery mode to test, they don't do their thing - is this to be expected?
config.action_mailer.delivery_method = :test
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是一个毫无意义的问题,但我会留下答案,以防它对其他人有帮助。
事实证明拦截器实际上正在运行。我遇到的问题是,因为它是通过delayed_job执行的,并且delayed_job不会重新加载每个作业上的类(毫不奇怪),所以我更改代码的事实尚未过滤到作业本身。
重新启动工作人员后,一切恢复正常
A bit of a nonstarter question but I'll leave the answer in case it helps anyone else.
It turns out the interceptor was actually running. The problem I was having is that because it was being executed via delayed_job and delayed_job does not reload the classes on each job (unsurprisingly), the fact that I'd changed the code had not yet filtered through to the jobs themselves.
On restarting the jobs worker, everything came back to normal