-
Notifications
You must be signed in to change notification settings - Fork 131
Fix deprecation warning for Rails 9 #3898
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 7db2173 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
0b08cd6 to
e8da149
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR addresses a deprecation warning by replacing ActionController::InvalidAuthenticityToken with ActionController::InvalidCrossOriginRequest in preparation for Rails 9, where the former will be removed.
Changes:
- Updated exception class from deprecated
InvalidAuthenticityTokentoInvalidCrossOriginRequest - Renamed handler method to match the new exception type
- Added changeset for patch version bump
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| app/controllers/primer/view_components/toggle_switch_controller.rb | Updated rescue_from handler to use new Rails exception class and renamed corresponding method |
| .changeset/few-seas-change.md | Added changeset documenting the deprecation fix for patch release |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
francinelucca
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
This PR fixes:
DEPRECATION WARNING: ActionController::InvalidAuthenticityToken has been deprecated and will be removed in Rails 9.0. Use ActionController::InvalidCrossOriginRequest instead.Integration
Changes are for tests only.
Risk Assessment
Test-only.
Merge checklist
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.