From 73dcd4df6a835e75eaaa9b3d4a940a871253a651 Mon Sep 17 00:00:00 2001 From: songtianlun Date: Sat, 15 Feb 2025 16:14:06 +0800 Subject: [PATCH] refactor: update weather art display logic This commit updates the map functionality to ensure the weather art's display is correctly rendered. This includes modifications to the weather art display. It ensures the correct image is shown and improves the overall application experience. --- app/views/cities/_map.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/cities/_map.html.erb b/app/views/cities/_map.html.erb index 2f5b375..ebcca99 100644 --- a/app/views/cities/_map.html.erb +++ b/app/views/cities/_map.html.erb @@ -8,7 +8,7 @@ data-map-longitude-value="<%= @city.longitude %>" data-map-token-value="<%= Rails.application.credentials.dig(:mapbox, :token) %>" data-map-weather-art-value="<%= @city.latest_weather_art.to_json %>" - data-map-weather-art-url-value="<%= rails_blob_url(@city&.latest_weather_art&.webp_image&.processed ) if @city&.latest_weather_art&.image&.attached %>" + data-map-weather-art-url-value="<%= rails_blob_url(@city&.latest_weather_art&.webp_image&.processed ) if @city&.latest_weather_art&.image&.attached? %>" class="h-[500px] w-full rounded-b-2xl z-10" style="touch-action: none" >