metamaps--metamaps/app/serializers/api/v2/synapse_serializer.rb

26 lines
513 B
Ruby
Raw Permalink Normal View History

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