Use the same component for similar topics as search results.

This commit is contained in:
Robin Ward
2015-06-24 15:08:22 -04:00
parent b4960d48b4
commit 6422d5efbd
14 changed files with 162 additions and 103 deletions

View File

@@ -0,0 +1,17 @@
class SimilarTopicSerializer < ApplicationSerializer
has_one :topic, serializer: TopicListItemSerializer, embed: :ids
attributes :id, :blurb, :created_at
def id
object.topic.id
end
def blurb
object.blurb
end
def created_at
object.topic.created_at
end
end