Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2017-09-27 17:39:10 +0300
committerJames Lopez <james@jameslopez.es>2017-09-28 09:46:39 +0300
commit1dcb7111107ed5a6b6258613d804b8da56af8b35 (patch)
treeccd463f601f4fada16e95dfc57796850aa1b85e7 /app/models/user.rb
parente07819cbf70511ad38c107dc593ec87606567cdc (diff)
refactor emails service
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