我是Rails和Ruby的新手,我找不到在此link_to中添加span的答案
<p class="withButtons" >
<%= link_to 'Répondre', lawyer_answers_path(@current_lawyer ? 'mon-compte' : ''), :class => 'button answerRevealer reply' %>
</p>
答案 0 :(得分:1)
您可以将一个块传递给link_to
<%= link_to lawyer_answers_path(@current_lawyer ? 'mon-compte' : ''), :class => 'button answerRevealer reply' do %>
<span>Répondre</span>
<% end %>