summaryrefslogtreecommitdiff
path: root/app/services/emails/destroy_service.rb
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2017-10-10 17:53:42 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2017-10-10 17:53:42 +0200
commit741fb49378abbf66fbd8d6ad27b94f1040bf3123 (patch)
tree6bc2393e7fd3d8733e0ef8a19c98bd16d2b4fdbd /app/services/emails/destroy_service.rb
parente678f312923faf9a702e19894175d4cb14f66b5b (diff)
parent9ac5338b8eb361927ad068486398b92acb0c287e (diff)
downloadgitlab-ce-741fb49378abbf66fbd8d6ad27b94f1040bf3123.tar.gz
Merge branch 'master' into bvl-group-trees
Diffstat (limited to 'app/services/emails/destroy_service.rb')
-rw-r--r--app/services/emails/destroy_service.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/services/emails/destroy_service.rb b/app/services/emails/destroy_service.rb
index 44011cc36c8..1ed131fe326 100644
--- a/app/services/emails/destroy_service.rb
+++ b/app/services/emails/destroy_service.rb
@@ -1,7 +1,7 @@
module Emails
class DestroyService < ::Emails::BaseService
- def execute
- update_secondary_emails! if Email.find_by_email!(@email).destroy
+ def execute(email)
+ email.destroy && update_secondary_emails!
end
private