delegate published in Elasticsearch to podcast to avoid showing ALL PDEs (#7006)

This commit is contained in:
Molly Struve 2020-04-01 15:02:14 -05:00 committed by GitHub
parent a396660986
commit 19d31bea03
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -5,13 +5,16 @@ module Search
attribute :id, &:search_id
attributes :body_text, :class_name, :comments_count, :hotness_score, :path,
:positive_reactions_count, :published, :published_at, :quote,
:positive_reactions_count, :published_at, :quote,
:reactions_count, :search_score, :subtitle, :summary, :title,
:website_url
attribute :main_image do |pde|
ProfileImage.new(pde.podcast).get(width: 90)
end
attribute :published do |pde|
pde.podcast.published
end
attribute :slug, &:podcast_slug
attribute :tags do |pde|