debian-mirror-gitlab/app/serializers/discussion_serializer.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
487 B
Ruby
Raw Normal View History

2018-11-18 11:00:15 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
class DiscussionSerializer < BaseSerializer
entity DiscussionEntity
2019-09-30 21:07:59 +05:30
def represent(resource, opts = {}, entity_class = nil)
super(resource, with_additional_opts(opts), entity_class)
end
private
def with_additional_opts(opts)
additional_opts = {
submodule_links: Gitlab::SubmoduleLinks.new(@request.project.repository)
}
opts.merge(additional_opts)
end
2018-03-17 18:26:18 +05:30
end
2019-12-04 20:38:33 +05:30
2021-06-08 01:23:25 +05:30
DiscussionSerializer.prepend_mod_with('DiscussionSerializer')