Manuel Bustillo
cb42b86136
All checks were successful
Run unit tests / unit_tests (pull_request) Successful in 2m39s
18 lines
317 B
Ruby
18 lines
317 B
Ruby
class SerializableGuest < JSONAPI::Serializable::Resource
|
|
type 'guest'
|
|
|
|
attributes :id, :email, :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
|