fb12c7e202
* feature/more.events * keep mapping.user as the creator * cleanup cruft and include slack notifs * capture topic and synapse updates, store the old values * avoid the mapping gets deleted problem * include an indicator of which values changed * style cleanup * remove the hack in favor of a legit way * updated schema file
27 lines
571 B
Ruby
27 lines
571 B
Ruby
# frozen_string_literal: true
|
|
module Api
|
|
module V2
|
|
class MappingSerializer < ApplicationSerializer
|
|
attributes :id,
|
|
:created_at,
|
|
:updated_at,
|
|
:mappable_id,
|
|
:mappable_type
|
|
|
|
attribute :xloc, if: -> { object.mappable_type == 'Topic' }
|
|
attribute :yloc, if: -> { object.mappable_type == 'Topic' }
|
|
|
|
def self.embeddable
|
|
{
|
|
user: {},
|
|
updated_by: {},
|
|
map: {}
|
|
}
|
|
end
|
|
|
|
class_eval do
|
|
embed_dat
|
|
end
|
|
end
|
|
end
|
|
end
|