Class: ProjectSerializer

Inherits:
BaseSerializer show all
Defined in:
app/serializers/project_serializer.rb

Instance Attribute Summary

Attributes inherited from BaseSerializer

#params

Instance Method Summary collapse

Methods inherited from BaseSerializer

entity, #initialize

Constructor Details

This class inherits a constructor from BaseSerializer

Instance Method Details

#represent(project, opts = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'app/serializers/project_serializer.rb', line 4

def represent(project, opts = {})
  entity =
    case opts[:serializer]
    when :import
      ProjectImportEntity
    else
      ProjectEntity
    end

  super(project, opts, entity)
end