From 2477ef0038b446a96678cff70f6a1bfe5f63d5ec Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Sun, 26 Jan 2025 17:20:21 +0100 Subject: [PATCH] Ensure that executions are properly ordered in the dashboard (#1588) They are not ordered, so postgres may return them in any order. I encounter this on postgres 17, checked the demo app to link to but didn't find any --- app/views/good_job/jobs/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/good_job/jobs/show.html.erb b/app/views/good_job/jobs/show.html.erb index e8172496..68bef2e7 100644 --- a/app/views/good_job/jobs/show.html.erb +++ b/app/views/good_job/jobs/show.html.erb @@ -84,4 +84,4 @@ <%= tag.pre JSON.pretty_generate(@job.display_serialized_params) %> <% end %> -<%= render 'executions', executions: @job.executions.reverse %> +<%= render 'executions', executions: @job.executions.sort_by(&:number).reverse %>