Bump rails to 5.2.0.rc1

This commit is contained in:
gregoirenovel 2018-01-30 17:14:56 +01:00
parent 2a5963f59b
commit 29d9b03672
5 changed files with 54 additions and 47 deletions

View file

@ -6,13 +6,13 @@ module CredentialsSyncableConcern
end
def sync_credentials
if email_changed? || encrypted_password_changed?
if saved_change_to_email? || saved_change_to_encrypted_password?
return force_sync_credentials
end
true
end
def force_sync_credentials
SyncCredentialsService.new(self.class, email_was, email, encrypted_password).change_credentials!
SyncCredentialsService.new(self.class, email_before_last_save, email, encrypted_password).change_credentials!
end
end