5
我试图使用现有的部分在的ActionMailer模板,像..渲染谐音中的ActionMailer模板
我merchant_offer.txt.html.erb
<%= render :partial => "offers/offer", :locals => {:offer => @offer} %>
Notifier.rb(我的邮件类):在另一个视图文件夹
def merchant_offer(offer)
subject "New Offer from #{offer.merchant.name}"
from "[email protected]"
recipients [email protected]
sent_on Time.now
body :offer => offer
end
的报价部分称为报价
但抛出缺失tempalate错误。
有没有办法在邮寄者tempalates中重新使用现有的视图部分?
谢谢