debian-mirror-gitlab/app/services/issuable/destroy_service.rb
2018-05-09 12:01:36 +05:30

12 lines
326 B
Ruby

module Issuable
class DestroyService < IssuableBaseService
def execute(issuable)
TodoService.new.destroy_target(issuable) do |issuable|
if issuable.destroy
issuable.update_project_counter_caches
issuable.assignees.each(&:invalidate_cache_counts)
end
end
end
end
end