24 lines
574 B
Ruby
24 lines
574 B
Ruby
module Search
|
|
class ListingSerializer < ApplicationSerializer
|
|
attributes :id,
|
|
:body_markdown,
|
|
:bumped_at,
|
|
:category,
|
|
:contact_via_connect,
|
|
:expires_at,
|
|
:location,
|
|
:processed_html,
|
|
:published,
|
|
:slug,
|
|
:title,
|
|
:user_id
|
|
|
|
attribute :tags, &:tag_list
|
|
|
|
attribute :author do |cl|
|
|
ListingAuthorSerializer.new(cl.author)
|
|
.serializable_hash
|
|
.dig(:data, :attributes)
|
|
end
|
|
end
|
|
end
|