summaryrefslogtreecommitdiff
path: root/app/services/issuable
diff options
context:
space:
mode:
authorGeorge Andrinopoulos <geoandri@gmail.com>2017-11-25 17:04:45 +0200
committerGeorge Andrinopoulos <geoandri@gmail.com>2017-11-25 22:09:18 +0200
commit7fb1bb01bd669cc46514ed17b1b8822a1d962970 (patch)
treeb6206b0a2e290e3254bff1475dfef0caf66503d4 /app/services/issuable
parentd199ecd452a3bfdc8ba7b4a0ae244a282c047c9f (diff)
downloadgitlab-ce-7fb1bb01bd669cc46514ed17b1b8822a1d962970.tar.gz
Create issue and merge request destroy services
Diffstat (limited to 'app/services/issuable')
-rw-r--r--app/services/issuable/destroy_service.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/services/issuable/destroy_service.rb b/app/services/issuable/destroy_service.rb
new file mode 100644
index 00000000000..0610b401213
--- /dev/null
+++ b/app/services/issuable/destroy_service.rb
@@ -0,0 +1,9 @@
+module Issuable
+ class DestroyService < IssuableBaseService
+ def execute(issuable)
+ if issuable.destroy
+ issuable.update_project_counter_caches
+ end
+ end
+ end
+end