Skip to content

Commit

Permalink
consistent ordering...
Browse files Browse the repository at this point in the history
  • Loading branch information
epugh committed Jul 27, 2023
1 parent d75ecb3 commit 4ff0399
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/home_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def lookup_most_recent_cases
# map to objects
most_recent_cases = Case.includes(:tries).where(id: [ case_ids ])
most_recent_cases = most_recent_cases.select { |kase| !kase.last_score.blank? }
most_recent_cases = most_recent_cases.sort_by { |x| case_ids.index x.id }
most_recent_cases = most_recent_cases.sort_by { |x| x.case_name }
most_recent_cases
end
end

0 comments on commit 4ff0399

Please sign in to comment.