lynndylanhurley / devise_token_auth

Token based authentication for Rails JSON APIs. Designed to work with jToker and ng-token-auth.
Do What The F*ck You Want To Public License
3.55k stars 1.14k forks source link

DeviseTokenAuth::Concerns::User overrides default ActiveModel dirty behavior #1546

Open andrewastrachan opened 2 years ago

andrewastrachan commented 2 years ago

https://github.com/lynndylanhurley/devise_token_auth/blob/8f44a8c66fd772b2d33be4ba187c0b1a47caba2a/app/models/devise_token_auth/concerns/user.rb#L44

If I include the DeviseTokenAuth::Concerns::User concern in one of my models, I can not longer reliably check changes the email attribute via user#email_changed?. This can lead to very unexpected behavior.