-
Notifications
You must be signed in to change notification settings - Fork 5
Add flag to identify school as linked to excs #546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add flag to identify school as linked to excs #546
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds a new user_origin
enum to the School
model and refactors the API views to include this field via a shared Jbuilder partial.
- Introduces
user_origin
column, enum, and model validations - Updates strong parameters and feature/spec tests to handle
user_origin
- Refactors
show
/index
views to use a_school.json.jbuilder
partial, including the new field
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
spec/models/school_spec.rb | Added tests for user_origin presence and default |
spec/features/school/creating_a_school_spec.rb | Included user_origin in feature spec payload |
db/schema.rb | Bumped schema version and added user_origin field |
db/migrate/20250515081023_add_connected_apps_table.rb | Migration adds user_origin but has a misleading name |
app/models/school.rb | Defines user_origin enum with default and validate |
app/controllers/api/schools_controller.rb | Permits user_origin in strong parameters |
app/views/api/schools/show.json.jbuilder | Switched to partial with user_origin: true |
app/views/api/schools/index.json.jbuilder | Switched to partial but missing user_origin |
app/views/api/schools/_school.json.jbuilder | New partial renders user_origin when requested |
app/views/api/my_school/show.json.jbuilder | Switched to partial but omits user_origin |
app/views/api/school_owners/_school_owner.json.jbuilder | Minor whitespace cleanup |
Comments suppressed due to low confidence (1)
db/migrate/20250515081023_add_connected_apps_table.rb:1
- The migration name and class suggest adding a connected apps table, but it only adds a
user_origin
column toschools
. Consider renaming the file and class toAddUserOriginToSchools
for clarity.
class AddConnectedAppsTable < ActiveRecord::Migration[7.1]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, let's get this out there! 🚀
Status
Points for consideration:
What's changed?
user_origin
enum to capture user originSteps to perform after deploying to production
N/A