Skip to content

Begin Rails 8.0 upgrade#447

Open
cycomachead wants to merge 1 commit into
mainfrom
cycomachead/137-rails-8-upgrade-start/2
Open

Begin Rails 8.0 upgrade#447
cycomachead wants to merge 1 commit into
mainfrom
cycomachead/137-rails-8-upgrade-start/2

Conversation

@cycomachead

Copy link
Copy Markdown
Contributor

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_defaults remains at 7.2 for 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

  • Added config/initializers/new_framework_defaults_8_0.rb with Rails 8.0 defaults commented out, to be enabled and verified one at a time before flipping config.load_defaults to 8.0

Code changes required by Rails 8

  • Migrated strong parameters from params.require(...).permit(...) to params.expect(...) in CourseSettingsController, FormSettingsController, and RequestsController — aligns with the Rails 8 idiom enforced by rubocop-rails's Rails/StrongParametersExpect cop
  • Updated two RSpec assertions in the API controller specs to match Rails 8's updated ParameterMissing error message ("...or invalid: ..." suffix added)

New Rails 8 generated file

  • Added public/400.html Bad Request error page

Testing

  • RSpec: 409 examples, 0 failures
  • Cucumber (rack_test): 16 scenarios, 158 steps — all pass
  • Rubocop: 139 files, 0 offenses
  • Brakeman: 0 warnings
  • App boots cleanly in development, test, and production environments on Rails 8.0.5

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

  • Name of branch corresponds to story

Superconductor Ticket Implementation | App Preview | Guided Review

- 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant