Skip to content

Rails 8.1 Upgrade#447

Merged
cycomachead merged 7 commits into
mainfrom
cycomachead/137-rails-8-upgrade-start/2
Jul 4, 2026
Merged

Rails 8.1 Upgrade#447
cycomachead merged 7 commits 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

cycomachead and others added 6 commits June 21, 2026 10:01
- 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>
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>
@cycomachead cycomachead changed the title Begin Rails 8.0 upgrade Rails 8.1 Upgrade Jul 2, 2026
@cycomachead cycomachead mentioned this pull request Jul 2, 2026
17 tasks
…-8-upgrade-start/2

# Conflicts:
#	Gemfile.lock
@cycomachead cycomachead added refactor dependencies Pull requests that update a dependency file labels Jul 4, 2026
@cycomachead cycomachead merged commit ee8ee62 into main Jul 4, 2026
13 checks passed
@cycomachead cycomachead deleted the cycomachead/137-rails-8-upgrade-start/2 branch July 4, 2026 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant