fix: update the weather art url
- Change the method of checking for attached images from `. - attached` to `.attached?` for consistency This commit addresses a bug where the weather art image was not displayed correctly on the map. It fixes the issue by using the `.attached?` method, which ensures that the correct image URL is used.
This commit is contained in:
parent
a2992d998b
commit
d3faea06a1
@ -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"
|
||||
></div>
|
||||
|
Loading…
Reference in New Issue
Block a user