metamaps--metamaps/app/serializers/api/v2/synapse_serializer.rb
2017-11-25 11:18:32 -08:00

26 lines
514 B
Ruby

# frozen_string_literal: true
module Api
module V2
class SynapseSerializer < ApplicationSerializer
attributes :id,
:desc,
:category,
:permission,
:created_at,
:updated_at
def self.embeddable
{
topic1: { serializer: TopicSerializer },
topic2: { serializer: TopicSerializer },
user: {}
}
end
class_eval do
embed_dat
end
end
end
end