Begin Rails 8.0 upgrade#447
Open
cycomachead wants to merge 1 commit into
Open
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>
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