summaryrefslogtreecommitdiff
path: root/app/views/runs
diff options
context:
space:
mode:
authorDavid Gay <david@davidgay.org>2023-11-02 18:43:53 -0400
committerDavid Gay <david@davidgay.org>2023-11-02 18:43:53 -0400
commit11b7be5c41edda171a05e92295c51320cb315c68 (patch)
treece15d742c594bde20b1d16629fca21a2a7ccf5b9 /app/views/runs
parent7fb0491b7954f59964b8f2153dce42855b50141f (diff)
Update checkpoints to have comment instead of title+desc, and display them
Diffstat (limited to 'app/views/runs')
-rw-r--r--app/views/runs/show.html.erb11
1 files changed, 7 insertions, 4 deletions
diff --git a/app/views/runs/show.html.erb b/app/views/runs/show.html.erb
index d7d65b6..55bef02 100644
--- a/app/views/runs/show.html.erb
+++ b/app/views/runs/show.html.erb
@@ -23,8 +23,8 @@
<h2 class="text-xl">Checkpoints</h2>
<%= link_to "New checkpoint", new_run_checkpoint_path(@run) %>
- <div class="border-l border-orange-900 p-2">
- <% @run.checkpoints.each do |checkpoint| %>
+ <% @run.checkpoints.order(:created_at).reverse.each do |checkpoint| %>
+ <div class="border-l border-orange-900 p-2">
<div class="flex flex-col">
<div>
<%= time_ago_in_words(checkpoint.created_at) %> ago by
@@ -38,7 +38,10 @@
<span>(No save file attached.)</span>
<% end %>
</div>
+ <% if checkpoint.comment %>
+ <div><%= checkpoint.comment %></div>
+ <% end %>
</div>
- <% end %>
- </div>
+ </div>
+ <% end %>
</div>