最佳答案
我想在ReportMailer视图(app/views/report_mailer/usage_report.text.html.erb
)中使用我在app/helpers/annotations_helper.rb
中定义的方法。我怎么做呢?
基于本指南,似乎add_template_helper(helper_module)
方法可以做我想做的事情,但我不知道如何使用它。
(顺便说一句,你在邮件视图中访问不同的一组助手有什么原因吗?这很烦人。)