summaryrefslogtreecommitdiff
path: root/app/models/user.rb
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2017-09-27 16:39:10 +0200
committerJames Lopez <james@jameslopez.es>2017-09-28 08:46:39 +0200
commit1dcb7111107ed5a6b6258613d804b8da56af8b35 (patch)
treeccd463f601f4fada16e95dfc57796850aa1b85e7 /app/models/user.rb
parente07819cbf70511ad38c107dc593ec87606567cdc (diff)
downloadgitlab-ce-1dcb7111107ed5a6b6258613d804b8da56af8b35.tar.gz
refactor emails servicerefactor-services
Diffstat (limited to 'app/models/user.rb')
-rw-r--r--app/models/user.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index 94674528012..103ac78783f 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -526,8 +526,8 @@ class User < ActiveRecord::Base
def update_emails_with_primary_email
primary_email_record = emails.find_by(email: email)
if primary_email_record
- Emails::DestroyService.new(self, self, email: email).execute
- Emails::CreateService.new(self, self, email: email_was).execute
+ Emails::DestroyService.new(self, user: self, email: email).execute
+ Emails::CreateService.new(self, user: self, email: email_was).execute
end
end