5
APIのテンプレート:マンドリル私は簡単なテストのためのテンプレートに従うマンドリルのルビーAPI宝石を使用して持ってい
require 'mandrill'
m = Mandrill::API.new
rendered = m.templates.render 'test-template', [{:header => 'some header text', :main_section => 'The main content block', :footer => '<h3>asdf</h3>'}]
mail(:to => "Jayson Lane <[email protected]>", :subject => "Test Email") do |format|
format.html { rendered['html'] }
#format.text { render "test" }
end
:私は従うRubyのコードを持っているHerokuのガイド上の例に従え
<html>
<body>
<h1 mc:edit="header">testastic</h1>
<hr/>
<br/><br/>
<div mc:edit="main_section"></div>
<hr/>
<div mc:edit="footer"></div>
</body>
</html>
をこれはうまく動作し、電子メールはテンプレートをうまく送信しますが、テンプレートmc:変数を置き換えることはありません。何か不足していますか?
!ありがとう! –