From e6577d0fd5ffacd24cf52125cd44037fc33fdb9a Mon Sep 17 00:00:00 2001 From: David Gay Date: Fri, 3 Nov 2023 02:25:06 -0400 Subject: Better home#index, using partials --- app/views/runs/show.html.erb | 36 +----------------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) (limited to 'app/views/runs/show.html.erb') diff --git a/app/views/runs/show.html.erb b/app/views/runs/show.html.erb index cca5029..9db4f53 100644 --- a/app/views/runs/show.html.erb +++ b/app/views/runs/show.html.erb @@ -27,41 +27,7 @@
<%= link_to "New checkpoint", new_run_checkpoint_path(@run) %>
<% @run.checkpoints.order(:created_at).reverse.each do |checkpoint| %> -
-
-
-
- <% case checkpoint.kind.to_sym %> - <% when :comment %> - 💬 - <% when :checkin %> - 📬 - <% when :checkout %> - 📭 - <% else %> - <%# Should never happen. %> - <% end %> -
-
- <%= checkpoint.kind %> - <% if checkpoint.save_file.attached? %> - <%= link_to "Download save file", rails_blob_path(checkpoint.save_file, disposition: "attachment") %> - <% end %> -
- -
-
-
-
- <%= time_ago_in_words(checkpoint.created_at) %> ago by - <%= link_to checkpoint.user.name || "???", user_path(checkpoint.user) %> - @ <%= checkpoint.created_at %> -
- <% if checkpoint.comment %> -
<%= checkpoint.comment %>
- <% end %> -
-
+ <%= render partial: "checkpoints/checkpoint", locals: {checkpoint:} %> <% end %>
-- cgit v1.2.3