<% answers = question.data.each.with_index.to_a %> <% answers = reorder_with_indices(answers, question.answer.data) if question.answer.present? %> <% answers.each do |a, i| %> <%= a %> <% end %>