<%
  content_for :section_title, "Questions"
%>

<% quizzes = @questions.group_by{ |q| q.quiz.name } %>
<% quizzes.each do |quiz, questions| %>
  <h1><%= quiz %></h1>
  <%= render partial: 'admin/question/table_list', locals: { questions: questions } %>
  <%= link_to('Edit Quiz', admin_quiz_path(questions.first.quiz.to_i), { class: 'btn' }) %>
<% end %>
