mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 06:29:30 +08:00
Rename variable so that it is clearer which variable is being referred.
This commit is contained in:
parent
b9ff6d60b9
commit
642c60c310
|
@ -992,11 +992,11 @@ class User < ActiveRecord::Base
|
|||
primary_email.email
|
||||
end
|
||||
|
||||
def email=(email)
|
||||
def email=(new_email)
|
||||
if primary_email
|
||||
new_record? ? primary_email.email = email : primary_email.update(email: email)
|
||||
new_record? ? primary_email.email = new_email : primary_email.update(email: new_email)
|
||||
else
|
||||
build_primary_email(email: email)
|
||||
build_primary_email(email: new_email)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user