在 Rails 上添加跨度 3 - 我必须在哪里添加跨度?
Adding a span on Rails 3 - Where I have to add the span?
我是 Rails 和 Ruby 的新手,我找不到在 link_to
中添加跨度的答案
<p class="withButtons" >
<%= link_to 'Répondre', lawyer_answers_path(@current_lawyer ? 'mon-compte' : ''), :class => 'button answerRevealer reply' %>
</p>
您可以将区块传递给 link_to
<%= link_to lawyer_answers_path(@current_lawyer ? 'mon-compte' : ''), :class => 'button answerRevealer reply' do %>
<span>Répondre</span>
<% end %>
我是 Rails 和 Ruby 的新手,我找不到在 link_to
中添加跨度的答案<p class="withButtons" >
<%= link_to 'Répondre', lawyer_answers_path(@current_lawyer ? 'mon-compte' : ''), :class => 'button answerRevealer reply' %>
</p>
您可以将区块传递给 link_to
<%= link_to lawyer_answers_path(@current_lawyer ? 'mon-compte' : ''), :class => 'button answerRevealer reply' do %>
<span>Répondre</span>
<% end %>