From d7007207c9f81d9a8459d4d910550e6d9031db71 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Wed, 24 Jun 2015 15:13:36 -0400 Subject: [PATCH] FIX: Missing `url` attribute for suggested topics --- app/serializers/similar_topic_serializer.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/serializers/similar_topic_serializer.rb b/app/serializers/similar_topic_serializer.rb index 15a4c2dc926..9e6e067e90a 100644 --- a/app/serializers/similar_topic_serializer.rb +++ b/app/serializers/similar_topic_serializer.rb @@ -1,7 +1,7 @@ class SimilarTopicSerializer < ApplicationSerializer has_one :topic, serializer: TopicListItemSerializer, embed: :ids - attributes :id, :blurb, :created_at + attributes :id, :blurb, :created_at, :url def id object.topic.id @@ -11,6 +11,10 @@ class SimilarTopicSerializer < ApplicationSerializer object.blurb end + def url + object.topic.url + end + def created_at object.topic.created_at end