From 92a4c558fac89d11be63e030de51f0e8a1848321 Mon Sep 17 00:00:00 2001 From: ajuvercr Date: Mon, 14 Sep 2020 21:33:13 +0200 Subject: [PATCH] just sorting quiz things --- layouts/partials/question.erb | 2 +- layouts/quiz.erb | 40 ++++++++++++++++++++++++++++------- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/layouts/partials/question.erb b/layouts/partials/question.erb index ef12d58..31def9d 100644 --- a/layouts/partials/question.erb +++ b/layouts/partials/question.erb @@ -7,7 +7,7 @@ <%else%>
- <% question[:antwoorden].each_with_index do |answer, idx| %> + <% question[:antwoorden].sort_by{ |x| x[:tekst] }.each_with_index do |answer, idx| %>