可能重复:
Best way to use Twitter Bootstrap Icons as Links in Ruby on Rails 3?
我有以下代码来删除项目:
<%= link_to "delete", sense, :method => :delete,
:confirm => "You sure?" %>
如何附加:方法和:确认到boostrap中使用的icon-remove
。我想要这样的东西:
<%= link_to <i class="icon-search"></i>, sense, :method => :delete,
:confirm => "You sure?" %>
这样做的正确方法是什么?
答案 0 :(得分:6)
<%= link_to sense, :method => :delete, :confirm => "You sure?" do %>
<i class="icon-search"></i>
<% end %>
这应该这样做。