fix: correct rendering syntax for wiki data badge

- Updated rendering syntax in 'show' view for cities
- Updated rendering syntax in 'show' view for weather arts

These changes ensure that the 'wiki_data_badge' partial is rendered
correctly in both views, improving the consistency of the code
and fixing potential display issues caused by the previous syntax.
This commit is contained in:
songtianlun 2025-04-02 15:06:02 +08:00
parent 1cc1af0ff2
commit 025ee0d06a
2 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@
<div class="badge badge-lg badge-secondary gap-2">
<%= @city&.state&.name %>
</div>
<% render "shared/wiki_data_badge", city: @city %>
<%= render "shared/wiki_data_badge", city: @city %>
</div>
<!-- 主要统计信息 -->

View File

@ -28,7 +28,7 @@
<div class="badge badge-lg badge-secondary">
<%= @weather_art&.city&.state&.name %>
</div>
<% render "shared/wiki_data_badge", city: @weather_art&.city %>
<%= render "shared/wiki_data_badge", city: @weather_art&.city %>
<div class="badge badge-lg badge-ghost">
<%= @weather_art.formatted_time(:date) %>
</div>