2018-07-19 14:43:13 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-02-09 06:14:48 -05:00
|
|
|
class ProjectSerializer < BaseSerializer
|
2018-11-07 11:44:21 -05:00
|
|
|
def represent(project, opts = {})
|
|
|
|
entity =
|
|
|
|
case opts[:serializer]
|
|
|
|
when :import
|
|
|
|
ProjectImportEntity
|
|
|
|
else
|
|
|
|
ProjectEntity
|
|
|
|
end
|
|
|
|
|
|
|
|
super(project, opts, entity)
|
|
|
|
end
|
2018-02-09 06:14:48 -05:00
|
|
|
end
|