metamaps--metamaps/app/serializers/new_synapse_serializer.rb
Connor Turland ada29c6832 cleanup
2016-03-12 21:35:56 +11:00

15 lines
425 B
Ruby

class NewSynapseSerializer < ActiveModel::Serializer
embed :ids, include: true
attributes :id,
:desc,
:category,
:weight,
:permission,
:created_at,
:updated_at
has_one :topic1, root: :topics, serializer: NewTopicSerializer
has_one :topic2, root: :topics, serializer: NewTopicSerializer
has_one :user, serializer: NewUserSerializer
end