class WolfCore::ApplicationSerializer

def serialized_relationships

def serialized_relationships
  self.class._relationships.each_with_object({}) do |(key, serializer_class), hash|
    related_object = object.public_send(key)
    hash[key] = if related_object.is_a?(Enumerable)
                  serializer_class.serialize_all(related_object, options)
                else
                  serializer_class.serialize(related_object, options).as_json
                end
  end
end