debian-mirror-gitlab/app/services/issuable_links/list_service.rb

28 lines
522 B
Ruby
Raw Normal View History

2020-11-24 15:15:51 +05:30
# frozen_string_literal: true
module IssuableLinks
class ListService
include Gitlab::Routing
attr_reader :issuable, :current_user
def initialize(issuable, user)
@issuable, @current_user = issuable, user
end
def execute
serializer.new(current_user: current_user, issuable: issuable).represent(child_issuables)
end
private
def serializer
raise NotImplementedError
end
def preload_for_collection
[{ project: :namespace }, :assignees]
end
end
end