Rails 8.1 Upgrade#447
Merged
Merged
Conversation
- Bump rails to ~> 8.0.2 and update dependencies to 8.0.5. - Add `config/initializers/new_framework_defaults_8_0.rb` to facilitate incremental adoption of new defaults. - Migrate strong parameters from `require().permit()` to `expect()` in controllers to align with Rails 8 idioms. - Update RSpec assertions to match Rails 8's updated `ParameterMissing` error message. - Add default `public/400.html` error page. Co-authored-by: Claude Code <noreply@anthropic.com>
…-8-upgrade-start/2 # Conflicts: # Gemfile.lock # app/controllers/course_settings_controller.rb # app/controllers/requests_controller.rb
- Refactor `RequestsController#request_params` to use `params.expect` and conditionally permit `assignment_id` based on the action name. - Enable `to_time_preserves_timezone = :zone` in framework defaults to resolve Rails 8.1 deprecation warnings. - Add regression test to ensure `assignment_id` remains immutable during request updates. Co-authored-by: Claude Code <noreply@anthropic.com>
Bump Rails 8.0.5 -> 8.1.3 and add new_framework_defaults_8_1.rb (staged, all commented). Fix breakages surfaced by 8.1: - ActionMailer::Base.mail (class-level) was removed in 8.1; route templated emails through a real TemplatedMailer / ApplicationMailer instead. - Replace deprecated :unprocessable_entity status symbol with :unprocessable_content (Rack 3.2) in specs. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-8-upgrade-start/2
Set config.load_defaults 8.1 and delete the now-obsolete new_framework_defaults_8_0.rb and new_framework_defaults_8_1.rb staging initializers. Full rspec + cucumber suites pass with all 8.0/8.1 defaults active. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
17 tasks
…-8-upgrade-start/2 # Conflicts: # Gemfile.lock
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.
General Info
Changes
Begins the Rails 8.0 upgrade, bumping from Rails 7.2 to 8.0.5. This follows the standard incremental upgrade pattern —
config.load_defaultsremains at7.2for now, with new 8.0 defaults available to opt into one at a time via the new framework defaults initializer.Dependency bump
Gemfile:rails ~> 7.2.3.1→~> 8.0.2(resolved to 8.0.5 in lockfile)Incremental defaults adoption
config/initializers/new_framework_defaults_8_0.rbwith Rails 8.0 defaults commented out, to be enabled and verified one at a time before flippingconfig.load_defaultsto8.0Code changes required by Rails 8
params.require(...).permit(...)toparams.expect(...)inCourseSettingsController,FormSettingsController, andRequestsController— aligns with the Rails 8 idiom enforced byrubocop-rails'sRails/StrongParametersExpectcopParameterMissingerror message ("...or invalid: ..."suffix added)New Rails 8 generated file
public/400.htmlBad Request error pageTesting
Documentation
No documentation changes required. Follow-up PRs will incrementally enable the new 8.0 framework defaults and eventually set
config.load_defaults 8.0.Checklist
Superconductor Ticket Implementation | App Preview | Guided Review