changed email_was !='' to email_was.present?

This commit is contained in:
Christian Macias
2015-10-26 08:56:14 -07:00
committed by Lucas Mazza
parent f25562fd4b
commit f63be5039a

View File

@@ -254,7 +254,7 @@ module Devise
end
def postpone_email_change?
postpone = self.class.reconfirmable && email_changed? && email_was != "" && !@bypass_confirmation_postpone && self.email.present?
postpone = self.class.reconfirmable && email_changed? && email_was.present? && !@bypass_confirmation_postpone && self.email.present?
@bypass_confirmation_postpone = false
postpone
end