<a href="#"><span>Ineffable</span><span>Evanescent Life</span></a>
<a href="#"><span>Chatoyant</span><span>Assemblage Love</span></a>
我有上面的代码,如何将其转换为link_to并同时包含两个跨度?
答案 0 :(得分:1)
使用link_to的阻止形式:
<%= link_to "#" do %>
<span>Ineffable</span><span>Evanescent Life</span>
<% end %>
<%= link_to "#" do %>
<span>Chatoyant</span><span>Assemblage Love</span>
<% end %>