【发布时间】:2016-12-23 09:22:14
【问题描述】:
我正在从我的 rails 应用程序中的 html.erb 文件生成一封电子邮件,供用户确认他们的电子邮件地址。我正在尝试将 link_to 行设置为绿色按钮下方,就像我在其他电子邮件中使用的那样。但是它显示为纯文本链接。
这是我遇到问题的链接
<tr style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; margin: 0;">
<td class="content-block" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; vertical-align: top; margin: 0; padding: 0 0 20px;" valign="top">
<%= link_to 'Confirm Email', confirmation_url(@resource, confirmation_token: @token), class: 'btn-sm-mpgreen' %>
</td>
</tr>
在电子邮件中看起来像这样
这是我创建的另一封电子邮件中的绿色按钮,我也想在上面使用。
<a href="<%= ENV['EXTERNAL_URL'] %>/#/new_match" class="btn-primary" itemprop="url" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; color: #FFF; text-decoration: none; line-height: 2em; font-weight: bold; text-align: center; cursor: pointer; display: inline-block; border-radius: 5px; text-transform: capitalize; background-color: #13904B; margin: 10px 0; border-color: #13904B; border-style: solid; border-width: 10px 20px;">Schedule Match</a>
在电子邮件中看起来像这样
【问题讨论】:
标签: html ruby-on-rails email