From df65ba57cc157f31130af6e5c9cabc0204a55c4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sen=C3=A9n=20Rodero=20Rodr=C3=ADguez?= <15726+Senen@users.noreply.github.com> Date: Thu, 22 Sep 2022 18:24:47 +0200 Subject: [PATCH] Use the same order criteria always The relation of question with its questions answers is ordered by default by `given_order`. --- app/components/polls/questions/answers_component.html.erb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/components/polls/questions/answers_component.html.erb b/app/components/polls/questions/answers_component.html.erb index 4c746951c..91be9ab15 100644 --- a/app/components/polls/questions/answers_component.html.erb +++ b/app/components/polls/questions/answers_component.html.erb @@ -16,15 +16,15 @@ <% end %> <% end %> <% elsif !user_signed_in? %> - <% question_answers.order(id: :desc).each do |question_answer| %> + <% question_answers.each do |question_answer| %> <%= link_to question_answer.title, new_user_session_path, class: "button secondary hollow" %> <% end %> <% elsif !current_user.level_two_or_three_verified? %> - <% question_answers.order(id: :desc).each do |question_answer| %> + <% question_answers.each do |question_answer| %> <%= link_to question_answer.title, verification_path, class: "button secondary hollow" %> <% end %> <% else %> - <% question_answers.order(id: :desc).each do |question_answer| %> + <% question_answers.each do |question_answer| %> <%= question_answer.title %> <% end %> <% end %>