wedding-planner/app/serializers/serializable_guest.rb

22 lines
346 B
Ruby

# frozen_string_literal: true
# Copyright (C) 2024 Manuel Bustillo
class SerializableGuest < JSONAPI::Serializable::Resource
type 'guest'
attributes :id, :group_id, :status
attribute :name do
@object.name
end
attribute :group_name do
@object.group.name
end
attribute :status do
@object.status.capitalize
end
end