【发布时间】:2015-01-28 12:16:02
【问题描述】:
我不知道如何正确使用带有国际化标签和字形图标的 link_to。
我的代码目前看起来像这样。
<%=link_to t('health_info.twitter_posts_featuredacc')+' <i class="fa fa-twitter"></i>'.html_safe, health_info_tweets_path(type: 'featured') %>
它会提取正确的翻译,但也会将 ''.html_safe 中的所有内容显示为普通的 html 代码,而不是字形图标。
提前致谢。
【问题讨论】: