wedding-planner/app/serializers/serializable_guest.rb
Manuel Bustillo 716b819de2
All checks were successful
Run unit tests / unit_tests (pull_request) Successful in 3m17s
Use jsonapi-rails to serialize API responses
2024-08-11 16:19:54 +02:00

10 lines
180 B
Ruby

class SerializableGuest < JSONAPI::Serializable::Resource
type 'guest'
attributes :id, :email
attribute :name do
"#{@object.first_name} #{@object.last_name}"
end
end