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.
Why these changes are being introduced:
We want to stay up to date with the latest Rails.
Relevant ticket(s):
https://mitlibraries.atlassian.net/browse/ENGX-155
How this addresses that need:
This upgrades to Rails 7 and loads the new framework defaults.
Prior to this, I ran
rails app:update
, checked the diffs for allfiles, and confirmed that the new framework defaults would not
cause problems. In this case, it seemed like there were no Rails
files that needed to be updated, so I kept the existing files.
Side effects of this change:
(
ApplicationController#ensure_domain
) now throws an unsaferedirect error. I've added the
allow_other_host
param to thatmethod to bypass this. In this case the other host would come
from env, so the risk seems low, but I'd encourage the reviewer
to consider any edge cases I may have missed.
problems for us was the key generator digest changing to SHA256:
https://guides.rubyonrails.org/v7.0/upgrading_ruby_on_rails.html#key-generator-digest-class-changing-to-use-sha256.
However, I don't think we are using encrypted cookies
in this app, so I don't anticipate problems there.
Developer
our guide and
all issues introduced by these changes have been resolved or opened as new
issues (link to those issues in the Pull Request details above)
Code Reviewer
(not just this pull request message)
Requires database migrations?
NO
Includes new or updated dependencies?
YES