20 lines
347 B
Ruby
20 lines
347 B
Ruby
# Copyright (C) 2024 Manuel Bustillo
|
|
|
|
class SerializableGuest < JSONAPI::Serializable::Resource
|
|
type 'guest'
|
|
|
|
attributes :id, :group_id, :status
|
|
|
|
attribute :name do
|
|
"#{@object.first_name} #{@object.last_name}"
|
|
end
|
|
|
|
attribute :group_name do
|
|
@object.group.name
|
|
end
|
|
|
|
attribute :status do
|
|
@object.status.capitalize
|
|
end
|
|
end
|