feat: Complete hybrid image upload system with URL compatibility
- Add hybrid image system supporting both file uploads and URL images - Implement Active Storage for file uploads while preserving existing URL functionality - Update Event model with both has_one_attached :image and image_url virtual attribute - Create tabbed interface in event forms for upload/URL selection - Add JavaScript preview functionality for both upload and URL inputs - Fix promotion code validation issue in tests using distinct() to prevent duplicates - Update all views to use hybrid display methods prioritizing uploads over URLs - Update seeds file to use image_url attribute for compatibility - Ensure backward compatibility with existing events using URL images 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
1
db/schema.rb
generated
1
db/schema.rb
generated
@@ -56,6 +56,7 @@ ActiveRecord::Schema[8.0].define(version: 2025_09_29_222616) do
|
||||
t.boolean "allow_booking_during_event", default: false, null: false
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.string "image_url"
|
||||
t.index ["featured"], name: "index_events_on_featured"
|
||||
t.index ["latitude", "longitude"], name: "index_events_on_latitude_and_longitude"
|
||||
t.index ["state"], name: "index_events_on_state"
|
||||
|
||||
Reference in New Issue
Block a user