Fix, Use devise_will_save_change_to_email? method for email change detection #1654
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.
Changes in this PR
This aligns with changes in
devise
.will_save_change_to_email? = false
todevise_will_save_change_to_email? = false
email_changed? = false
Background
In the
devise
gem, thedevise_will_save_change_to_email?
method was introduced as a wrapper aroundwill_save_change_to_email?
oremail_changed?
to accommodate changes in dirty tracking. (Changed)As a result, email validation in devise has also been updated to use
devise_will_save_change_to_email?
.After that, only the
devise_will_save_change_to_email?
method, which wrappedemail_changed?
, was removed. Drop support to EOL rubies and Rails#5600.For more details, please refer to the following
devise
Pull Request:heartcombo/devise#5575
heartcombo/devise#5600
Effect
There are no behavioral changes introduced by this update.
devise_token_auth
does not use devise's email validation.devise_will_save_change_to_email?
simply callswill_save_change_to_email?
.I would like to take this opportunity to thank the maintainers❤️