Bump rails to 5.2.0.rc1
This commit is contained in:
parent
2a5963f59b
commit
29d9b03672
5 changed files with 54 additions and 47 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue