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

16 lines
284 B
Ruby
Raw Normal View History

2018-11-18 11:00:15 +05:30
# frozen_string_literal: true
2018-03-27 19:54:05 +05:30
class ProjectSerializer < BaseSerializer
2019-07-07 11:18:12 +05:30
def represent(project, opts = {})
entity =
case opts[:serializer]
when :import
ProjectImportEntity
else
ProjectEntity
end
super(project, opts, entity)
end
2018-03-27 19:54:05 +05:30
end