debian-mirror-gitlab/app/services/issuable_links/list_service.rb
2021-12-11 22:18:48 +05:30

33 lines
602 B
Ruby

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