app/models/decidim/blogs/post.rb in decidim-blogs-0.19.1 vs app/models/decidim/blogs/post.rb in decidim-blogs-0.20.0

- old
+ new

@@ -9,17 +9,25 @@ include Decidim::HasAttachments include Decidim::HasAttachmentCollections include Decidim::HasComponent include Decidim::Authorable include Decidim::Comments::Commentable + include Decidim::Searchable include Traceable include Loggable component_manifest_name "blogs" validates :title, presence: true scope :created_at_desc, -> { order(arel_table[:created_at].desc) } + + searchable_fields( + participatory_space: { component: :participatory_space }, + A: :title, + D: :body, + datetime: :created_at + ) # Public: Overrides the `commentable?` Commentable concern method. def commentable? component.settings.comments_enabled? end