我是 Rails 和 Ruby 的新手,我找不到在这个 link_to 中添加跨度的答案
<p class="withButtons" >
<%= link_to 'Répondre', lawyer_answers_path(@current_lawyer ? 'mon-compte' : ''), :class => 'button answerRevealer reply' %>
</p>
最佳答案
您可以将 block 传递给 link_to
<%= link_to lawyer_answers_path(@current_lawyer ? 'mon-compte' : ''), :class => 'button answerRevealer reply' do %>
<span>Répondre</span>
<% end %>
关于ruby-on-rails - 在 Rails 3 上添加跨度 - 我必须在哪里添加跨度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27962662/