Draft
Conversation
Member
stuzart
commented
Jan 22, 2026
- fix for Event types, and also hybrid/offline option #2413
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds two new fields to the Event model: event_type and location_type. The event_type field introduces a new EventType model that categorizes events (e.g., Workshop, Conference, Seminar), while location_type is an enum that specifies whether an event is in-person, hybrid, or online.
Changes:
- Created EventType model with database migration and seed data for default event types
- Added location_type enum to Event model with three values (in_person, hybrid, online)
- Updated API schemas, serializers, controllers, and views to support both new fields
- Added comprehensive test coverage for the new functionality
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| db/migrate/20251210163215_add_location_type_to_events.rb | Adds location_type integer column to events table |
| db/migrate/20251211150643_create_event_types.rb | Creates event_types table with title and description |
| db/migrate/20251211150800_add_event_type_to_events.rb | Adds event_type_id reference to events table |
| db/schema.rb | Updates schema version and reflects new tables/columns |
| db/seeds/019_event_types.seeds.rb | Seeds default event types from YAML configuration |
| config/default_data/event_types.yml | Defines default event type categories |
| app/models/event.rb | Adds location_type enum and event_type association |
| app/models/event_type.rb | New model for event type categories |
| app/controllers/events_controller.rb | Permits new fields in event_params |
| app/serializers/event_serializer.rb | Serializes event_type and location_type for API |
| app/views/events/show.html.erb | Displays event_type and location_type in event details |
| app/views/events/_form.html.erb | Adds form inputs for event_type and location_type |
| app/views/events/_resource_list_item.html.erb | Shows event_type in list view |
| lib/seek/api/parameter_converter.rb | Converts event_type title to ID for API requests |
| lib/seek/filterer.rb | Adds filtering support for event_type |
| lib/tasks/seek_upgrades.rake | Includes event_types seed task in upgrade process |
| public/api/definitions/_schemas.yml | Defines API schemas for new fields |
| public/api/descriptions/events.md | Documents location_type field |
| public/api/examples/*.json | Updates example JSON responses with new fields |
| test/factories/events.rb | Adds event_type factory and updates max_event factory |
| test/functional/events_controller_test.rb | Tests controller handling of new fields |
| test/integration/api/event_api_test.rb | Ensures Workshop event type exists for API tests |
| test/fixtures/json/*.json.erb | Updates test fixtures to include new fields |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
4dd3764 to
28c2da1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.