diff options
author | Alexandru Croitor <acroitor@gitlab.com> | 2019-06-17 15:58:48 +0300 |
---|---|---|
committer | Alexandru Croitor <acroitor@gitlab.com> | 2019-06-26 12:28:00 +0300 |
commit | 0f6c42c5ce165dadf1976ae15a043b87ca533618 (patch) | |
tree | 9220ed5a8eb628ca3c5170a0d5f9400870538797 /app/services/boards/destroy_service.rb | |
parent | 2b9ddc2f99bc0a49967c9ccc5b79ccc53e7559b4 (diff) |
Move Multiple Issue Boards for Projects to Core
Refactor code to allow multiple issue boards management for projects
in CE
Diffstat (limited to 'app/services/boards/destroy_service.rb')
-rw-r--r-- | app/services/boards/destroy_service.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/services/boards/destroy_service.rb b/app/services/boards/destroy_service.rb new file mode 100644 index 00000000000..ea0c1394aa3 --- /dev/null +++ b/app/services/boards/destroy_service.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module Boards + class DestroyService < Boards::BaseService + def execute(board) + return false if parent.boards.size == 1 + + board.destroy + end + end +end |