如何在html_options中使用rails mail_to helper?

时间:2012-01-24 19:10:08

标签: ruby-on-rails

=mail_to "info@somewhere.com", nil, :html_options => {:style => 'font-weight: bold'}

呈现为

<a href="mailto:info@somewhere.com" html_options="stylefont-weight: bold">info@somewhere.com</a>

我的错误是什么?

1 个答案:

答案 0 :(得分:7)

摆脱html_options包装器:

=mail_to "info@somewhere.com", nil, :style => 'font-weight: bold'