wedding-planner/app/serializers/serializable_guest.rb
Manuel Bustillo cb42b86136
All checks were successful
Run unit tests / unit_tests (pull_request) Successful in 2m39s
Include confirmation status
2024-08-11 19:24:24 +02:00

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