Use the same order criteria always

The relation of question with its questions answers is ordered by default by
`given_order`.
This commit is contained in:
Senén Rodero Rodríguez
2022-09-22 18:24:47 +02:00
parent 0ec4d52ed1
commit df65ba57cc

View File

@@ -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| %>
<span class="button secondary hollow disabled"><%= question_answer.title %></span>
<% end %>
<% end %>