5260 suppress erroneous email reset warning#6408
Merged
compwron merged 3 commits intorubyforgood:mainfrom Jun 9, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR resolves issue #5260 by overriding Devise’s default behavior to suppress an erroneous email confirmation warning when a password is updated. Key changes include adding an update method in the passwords controller to handle custom password resets and introducing a new request spec to verify the success path.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| spec/requests/users/passwords_spec.rb | Adds a request spec for the password update behavior |
| app/controllers/users/passwords_controller.rb | Implements a custom update method to override Devise’s behavior |
Comments suppressed due to low confidence (2)
app/controllers/users/passwords_controller.rb:28
- Consider using new_user_session_path explicitly for redirection to match the test expectations and ensure consistent behavior.
redirect_to new_session_path(resource_name)
spec/requests/users/passwords_spec.rb:146
- Consider adding test coverage for the failure scenario to verify that error responses are handled appropriately.
it "successfully resets the password" do
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.
What github issue is this PR for, if any?
Resolves #5260
What changed, and why?
A method (
def update) was added to override the defaultDevisebehavior that was causing an erroneous warning regarding email confirmation. The users should not be given that warning as emails are automatically, manually, labeled as confirmed when an account is created.Now when a password is successfully updated the user will only see the success message.
How is this tested? (please write rspec and jest tests!) 💖💪
Note: if you see a flake in your test build in github actions, please post in slack #casa "Flaky test: " :) 💪
Note: We love capybara tests! If you are writing both haml/js and ruby, please try to test your work with tests at every level including system tests like https://github.com/rubyforgood/casa/tree/main/spec/system
A test was added to
spec/requests/users/passwords_spec.rb,Screenshots please :)
Run your local server and take a screenshot of your work! Try to include the URL of the page as well as the contents of the page.

Feelings gif (optional)
What gif best describes your feeling working on this issue? https://giphy.com/
How to embed:
