Skip to content

Commit

Permalink
Fix crash on devise 4.7.2+ (lynndylanhurley#1412)
Browse files Browse the repository at this point in the history
* Ignore sync uid in case confirmable mail changed

* Update user_omniauth_callbacks.rb

* Update user_omniauth_callbacks.rb

* fix crash on devise 4.7.2+
  • Loading branch information
pnghai authored Jun 19, 2020
1 parent bb09616 commit 4461a09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/models/devise_token_auth/concerns/confirmable_support.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ def postpone_email_change?
protected

def email_value_in_database
if Devise.rails51? && respond_to?(:email_in_database)
rails51 = Rails.gem_version >= Gem::Version.new("5.1.x")
if rails51 && respond_to?(:email_in_database)
email_in_database
else
email_was
Expand Down

0 comments on commit 4461a09

Please sign in to comment.