【发布时间】:2018-01-30 04:39:10
【问题描述】:
我想在 haml 中将 mailto 与我的 rails 4 一起使用,rails i8n 也是如此。我试过这样做
%a{href: Content.email, mailto: true, target: '_blank'}
= t :footer_email_us
但是,通过这种方式,当我单击链接时,我在收件人字段中附加了错误的电子邮件 ID。
【问题讨论】:
-
试试这个:= mail_to "#{Content.email}", "#{Content.email}", target: '_blank'
-
为什么两次Content.email,我的文字来自国际化,
-
谢谢@Sunny,但我显示的文本来自rails i8n,你知道我怎样才能使用上面的文本给出它。
-
来自 rails i18n 的文本是什么?
标签: html ruby-on-rails-4 haml mailto