diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb index 2a0647c..67efbc3 100644 --- a/app/views/home/index.html.erb +++ b/app/views/home/index.html.erb @@ -5,7 +5,7 @@
<% begin %> <%= image_tag @latest_arts&.first&.webp_image&.processed, - alt: @latest_arts.image_alt, + alt: @latest_arts&.first&.image_alt, class: "w-full h-full object-cover" %> <% rescue StandardError => e %> <% Rails.logger.error("图片加载失败: #{e.message}") if defined?(Rails) %>