From 6281ca73a275f3ef63830be5ca8d118716f2daed Mon Sep 17 00:00:00 2001 From: songtianlun Date: Sat, 8 Feb 2025 09:25:08 +0800 Subject: [PATCH] fix: update created_at timestamp display - Change displayed time from weather_date to created_at in cities and weather arts show templates. This ensures that the time shown reflects when the record was created instead of the weather date which may not be accurate for representation. --- app/views/cities/show.html.erb | 2 +- app/views/weather_arts/show.html.erb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/cities/show.html.erb b/app/views/cities/show.html.erb index c709d87..f5b8981 100644 --- a/app/views/cities/show.html.erb +++ b/app/views/cities/show.html.erb @@ -107,7 +107,7 @@
<%= art.temperature %>°C
-
<%= art.weather_date.strftime("%H:%M") %>
+
<%= art.created_at.strftime("%H:%M") %>
<%= art.weather_date.strftime("%B %d, %Y") %>
diff --git a/app/views/weather_arts/show.html.erb b/app/views/weather_arts/show.html.erb index d876cdf..78990ad 100644 --- a/app/views/weather_arts/show.html.erb +++ b/app/views/weather_arts/show.html.erb @@ -56,7 +56,7 @@ <%= @weather_art.weather_date.strftime("%B %d, %Y") %>
- <%= @weather_art.weather_date.strftime("%H:%M") %> + <%= @weather_art.created_at.strftime("%H:%M") %>