Rails 7 -> 8.0.5#815
Conversation
Test coverage91.05% line coverage reported by SimpleCov. |
There was a problem hiding this comment.
Pull request overview
Upgrades the application from Rails 7.2 to Rails 8.x, updating configuration defaults, strong-parameter handling, and tests to match new Rails behaviors (notably ActionController::Parameters#expect and updated exception messages).
Changes:
- Bump Rails dependency and framework defaults to Rails 8 (Gemfile/Gemfile.lock +
config.load_defaults). - Replace
require(...).permit(...)strong params withparams.expect(...)in several API controllers. - Adjust request/spec helpers for rake task loading/reenabling and update brittle expectation(s) affected by Rails 8.
Reviewed changes
Copilot reviewed 14 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/requests/test_utilities_spec.rb | Updates rake task handling around request specs. |
| spec/requests/api_controller_spec.rb | Updates expected ParameterMissing error message for Rails 8. |
| spec/rails_helper.rb | Loads rake tasks once per suite and reenables tasks around type: :task specs. |
| spec/features/school_class/listing_school_classes_spec.rb | Makes assertions order-independent by locating classes by name. |
| Gemfile.lock | Resolves Rails and related gems to Rails 8.x versions. |
| Gemfile | Updates Rails dependency requirement to ~> 8.0.4. |
| config/application.rb | Updates config.load_defaults to 8.0. |
| app/controllers/api/subscriptions_controller.rb | Switches strong params to params.expect. |
| app/controllers/api/schools_controller.rb | Switches strong params to params.expect. |
| app/controllers/api/school_teachers_controller.rb | Switches strong params to params.expect. |
| app/controllers/api/school_students_controller.rb | Switches strong params to params.expect. |
| app/controllers/api/school_classes_controller.rb | Switches strong params to params.expect. |
| app/controllers/api/projects/remixes_controller.rb | Switches strong params to params.expect (includes nested params). |
| app/controllers/api/google_auth_controller.rb | Switches strong params to params.expect. |
| app/controllers/api/class_members_controller.rb | Switches strong params to params.expect. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| params.require(:google_auth).require(:code) | ||
| params.require(:google_auth).require(:redirect_uri) | ||
| params.require(:google_auth).permit(:code, :redirect_uri) | ||
| params.expect(google_auth: %i[code redirect_uri]) |
There was a problem hiding this comment.
Does the comment you made in https://github.com/RaspberryPiFoundation/editor-api/pull/784/changes#r3159800329 still apply here?
Status
Points for consideration:
What's changed?
It has been upgraded rails 7 to rails 8.0.4 following the conversations from the Issue above and #784