discourse/app/serializers/search_logs_serializer.rb

18 lines
329 B
Ruby

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