アドバイスが必要です。ビューで変数を直接割り当てるのは悪い習慣であることを知っています。しかし、ブートストラップ「nav-tab」を実現する方法は1つしかありません。別の方法があるかもしれませんか?ありがとう
<div class="tabbable tabs-left">
  <ul class="nav nav-tabs">
    <% answer = [] %>  // Here it is..
    <% @questions.each_with_index do |question, index| %>
        <li class="<%= "active" if index == 0 %>">
          <a href="#pane<%= index + 1 %>" data-toggle="tab">
            <%= question.title %>
          </a>
        </li>
       <% answer << [index, question]%>
    <% end %>
  </ul>
  <div class="tab-content">
    <% answer.each do |i, a| %>
      <div id="pane<%= i + 1 %>" class="tab-pane <%= 'active' if i == 0 %>">
        <div class="links">
          <%= link_to '', edit_question_path(a), class: "icon-pencil" %>
          <%= link_to '', a, method: :delete, data: { confirm: 'Are you sure?' }, class: "icon-remove" %>
        </div>
        <%= raw a.content %>
      </div>
    <% end %>
  </div><!-- /.tab-content -->
</div><!-- /.tabbable -->