【问题标题】:Adding a span on Rails 3 - Where I have to add the span?在 Rails 3 上添加跨度 - 我必须在哪里添加跨度?
【发布时间】:2015-01-15 11:43:03
【问题描述】:

我是 Rails 和 Ruby 的新手,我找不到在这个 link_to 中添加跨度的答案

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

【问题讨论】:

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


    【解决方案1】:

    你可以将一个块传递给link_to

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-12-26
      • 1970-01-01
      • 1970-01-01
      • 2021-05-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多