使用haml在link_to helper里面的字体很棒 我应该怎么做? 我有这个代码
.link_header
{link_to_ledger(current_ledger) span.icon-flag }
请帮助
答案 0 :(得分:1)
只需将span
作为块传递给link_to
辅助方法,如下所示:
.link_header
= link_to_ledger(current_ledger) do
span.icon-flag
答案 1 :(得分:1)
rails中有两个链接选项
= link_to 'my link text', controllers_path
.link_header
= link_to_ledger(current_ledger) do
%span.icon-flag
-# you can also do what ever you want here even table/images can also be added