feat: Complete hybrid image upload system with URL compatibility #8

Open
kbe wants to merge 7 commits from feat/image-upload into develop
Owner
  • 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

Co-Authored-By: Claude noreply@anthropic.com

- 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>
kbe added 1 commit 2025-09-29 23:07:07 +00:00
- 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>
kbe added 3 commits 2025-10-01 06:38:08 +00:00
Update all event-related view templates and controllers to properly handle and display event images throughout the application.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add Rails parameterize for server-side slug generation (name-venue-city format)
- Configure client-side slug library with RFC3986 mode for consistency
- Remove slug field from edit forms to prevent URL changes after publication
- Enable image_processing gem for Active Storage variants
- Make geocoding notifications visible indefinitely on promoter event forms
- Add server-side slug generation fallback with uniqueness validation
- Update promoter controller to allow slug only for new events

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
kbe added 1 commit 2025-10-01 06:40:11 +00:00
kbe added 1 commit 2025-10-01 06:48:08 +00:00
- Add tests for SEO-friendly slug generation with name, venue, and city
- Add tests for slug uniqueness and fallback behavior
- Add tests for image URL validation and handling
- Add tests for image detection methods (has_image?, display_image)
- Fix duplicate has_image? method in Event model
- Remove duplicate test method to resolve test failures
- All 50 tests now passing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
kbe added 1 commit 2025-10-02 08:11:13 +00:00
- 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 pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/image-upload:feat/image-upload
git checkout feat/image-upload
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kbe/aperonight#8
No description provided.