mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 08:09:13 -05:00
18 lines
287 B
Ruby
18 lines
287 B
Ruby
|
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
|