discourse/app/serializers/search_logs_serializer.rb

18 lines
329 B
Ruby
Raw Normal View History

2017-11-14 19:13:50 -05:00
class SearchLogsSerializer < ApplicationSerializer
attributes :term,
:searches,
:click_through,
:clicked_topic_id,
:topic_title,
:topic_url,
:unique
def topic_title
object&.topic&.title
end
def topic_url
object&.topic&.url
end
end