2018-11-18 11:00:15 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-27 19:54:05 +05:30
|
|
|
class ProjectSerializer < BaseSerializer
|
2019-05-18 00:54:41 +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
|