2021-06-07 13:34:01 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class DirectoryColumnSerializer < ApplicationSerializer
|
|
|
|
attributes :id,
|
|
|
|
:name,
|
2021-06-22 14:00:04 -04:00
|
|
|
:type,
|
2021-06-07 13:34:01 -04:00
|
|
|
:position,
|
2021-06-22 14:00:04 -04:00
|
|
|
:icon,
|
|
|
|
:user_field_id
|
2021-06-07 13:34:01 -04:00
|
|
|
|
2021-06-22 14:00:04 -04:00
|
|
|
def name
|
|
|
|
object.name || object.user_field.name
|
|
|
|
end
|
2021-06-07 13:34:01 -04:00
|
|
|
end
|