开发者

Using Resque and resque_mailer to send emails raises Routing error

I'm trying to send emails using a background job in Rails 3 using Resque and the resque_mailer gem. Emails are sent fine when not using Resque, but when they are processed as a background job, the job fails raising a ActionView::Template::Error which I've traced back to a link that I'm trying to print on the email. This is the conflicting line:

link_to t('.here'), topic_url(@comment.topic, :load_all => true, :anchor => "c#{@comment.id}")

Even trying to print a root_url raises a similar exception.

Does anyone ha开发者_运维问答ve any ideas as to why this is failing? I've tried almost everything :(

Thanks in advance!


Make sure you don't send ActiveRecord objects in the params to the mailer method. But rather send identifiers and load them in the method body.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜