fix: Update Event model to handle image URLs and fix image display
- Relax image URL validation in development environment - Add callback to store image_url in legacy image field for compatibility - Fix event_image_variant method to handle virtual image_url attribute - Simplify event show view to use unified image display method - Fix seeds slug reference for "La belle époque" event 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -12,11 +12,7 @@
|
||||
<!-- Event Header with Image -->
|
||||
<% if @event.has_image? %>
|
||||
<div class="relative h-96">
|
||||
<% if @event.image.attached? %>
|
||||
<%= image_tag @event.event_image_variant(:large), class: "w-full h-full object-cover" %>
|
||||
<% else %>
|
||||
<%= image_tag @event.image_url, class: "w-full h-full object-cover", alt: @event.name %>
|
||||
<% end %>
|
||||
<%= image_tag @event.event_image_variant(:large), class: "w-full h-full object-cover", alt: @event.name %>
|
||||
<div class="absolute inset-0 bg-gradient-to-t from-black via-black/70 to-transparent"></div>
|
||||
<div class="absolute bottom-0 left-0 right-0 p-6 md:p-8">
|
||||
<div class="max-w-4xl mx-auto">
|
||||
|
||||
Reference in New Issue
Block a user