From a5ab635d501db5e8cd8a4beb94d789aaef94281a Mon Sep 17 00:00:00 2001 From: Glenn Jackman Date: Fri, 20 Dec 2024 14:51:52 -0500 Subject: [PATCH] 48in24 challenge page to stop counting weeks on Dec 15 In order to avoid "Week 49 of #48in24" --- app/views/challenges/48in24.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/challenges/48in24.html.haml b/app/views/challenges/48in24.html.haml index 6474ea977e..0f16acb4a6 100644 --- a/app/views/challenges/48in24.html.haml +++ b/app/views/challenges/48in24.html.haml @@ -1,4 +1,4 @@ -- week = ((Time.zone.today - Date.new(2024, 1, 15)) / 7).ceil +- week = (([ Time.zone.today, Date.new(2024,12,15) ].min - Date.new(2024, 1, 15)) / 7).ceil - live_exercises = @exercises.select { |e| e.week <= week } - tracks = Track.where(slug: live_exercises.flat_map(&:featured_tracks)).pluck(:slug, :title).to_h