From d672465c2be3dc54463a92a3f1c4aa23447bc5c8 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sun, 29 Oct 2023 14:02:34 -0400 Subject: better display of completions --- app/views/wittle/puzzles/show.html.haml | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'app/views') diff --git a/app/views/wittle/puzzles/show.html.haml b/app/views/wittle/puzzles/show.html.haml index d5d8b00..75ae288 100644 --- a/app/views/wittle/puzzles/show.html.haml +++ b/app/views/wittle/puzzles/show.html.haml @@ -14,12 +14,18 @@ #scores #by-time %h2 Fastest Solves - %ol + %table - @puzzle.scores.where("seconds_taken IS NOT NULL").order(seconds_taken: :asc).each do |score| - %li= score.name + %tr + %td #{(i + 1)}. + %td= score.name + %td #by-when %h2 Completion Order - %ol - - @puzzle.scores.order(created_at: :desc).each do |score| - %li= score.name + %table + - @puzzle.scores.order(created_at: :asc).each_with_index do |score, i| + %tr + %td #{(i + 1)}. + %td= score.name + %td= score.created_at.getlocal().strftime("%-I:%M:%S%P") = render partial: "handle_puzzle" -- cgit 1.4.1