just don't include mappable for now

This commit is contained in:
Connor Turland 2016-03-13 02:28:39 +11:00
parent f072e39c4c
commit 3aec00e07c

View file

@ -4,10 +4,12 @@ class NewMappingSerializer < ActiveModel::Serializer
:xloc,
:yloc,
:created_at,
:updated_at
:updated_at,
:mappable_id,
:mappable_type
has_one :user, serializer: NewUserSerializer
has_one :map, serializer: NewMapSerializer
has_one :mappable, polymorphic: true ##?
def filter(keys)
keys.delete(:xloc) unless object.mappable_type == "Topic"