Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当然,只需尝试以下操作:
<%= content_tag(:li, :class => 'sidebar') do %> <%= link_to '#' do %> <%= content_tag :i, '', :class => 'icon-user' %> Home <% end -%> <% end -%>
我使用的较短的替代方案是
link_to " ".html_safe, '#'
它“更脏”但更容易理解。