在Rails 3上添加跨度 - 我必须添加跨度?

时间:2015-01-15 11:43:04

标签: ruby-on-rails ruby-on-rails-3 css3

我是Rails和Ruby的新手,我找不到在此link_to中添加span的答案

<p class="withButtons" >
   <%= link_to 'Répondre', lawyer_answers_path(@current_lawyer ? 'mon-compte' : ''), :class => 'button answerRevealer reply' %>
</p>

1 个答案:

答案 0 :(得分:1)

您可以将一个块传递给link_to

<%= link_to lawyer_answers_path(@current_lawyer ? 'mon-compte' : ''), :class => 'button answerRevealer reply' do %>
  <span>Répondre</span>
<% end %>