【问题标题】:Email text showing link as code将链接显示为代码的电子邮件文本
【发布时间】:2018-06-13 10:45:49
【问题描述】:

当我在电子邮件中发送链接时,它显示为

<a href="http://www.tipestrygo.com/home/edit_password_reset.f9TyDqoowXOBQG6ha_qhwg">Change my password</a>

密码.text.erb

<%= link_to 'Change my password', edit_password_reset_home_index_url(@user.password_reset_token) %>

【问题讨论】:

  • 您有问题吗?
  • 您是否将内容类型设置为text/htmlstackoverflow.com/questions/17980631/…
  • 什么是edit_password_reset_home_index_url?请在您的config/routes.rb 中如何定义该路线。

标签: ruby-on-rails ruby


【解决方案1】:

将您的文件名从 password.text.erb 更改为 password.html.erb

这将解决您的问题。

【讨论】:

    猜你喜欢
    • 2015-11-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-06-27
    • 2011-09-03
    • 1970-01-01
    • 2014-10-20
    相关资源
    最近更新 更多