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

16 lines
475 B
Ruby

class NewMapSerializer < ActiveModel::Serializer
embed :ids, include: true
attributes :id,
:name,
:desc,
:permission,
:screenshot,
:created_at,
:updated_at
has_many :topics, serializer: NewTopicSerializer
has_many :synapses, serializer: NewSynapseSerializer
has_many :mappings, serializer: NewMappingSerializer
has_many :contributors, root: :users, serializer: NewUserSerializer
end