app/models/decidim/blogs/post.rb in decidim-blogs-0.27.3 vs app/models/decidim/blogs/post.rb in decidim-blogs-0.27.4

- old
+ new

@@ -12,10 +12,11 @@ include Decidim::Authorable include Decidim::Comments::CommentableWithComponent include Decidim::Searchable include Decidim::Endorsable include Decidim::Followable + include Decidim::Reportable include Decidim::TranslatableResource include Traceable include Loggable component_manifest_name "blogs" @@ -70,9 +71,24 @@ followers end def attachment_context :admin + end + + # Public: Overrides the `reported_content_url` Reportable concern method. + def reported_content_url + ResourceLocatorPresenter.new(self).url + end + + # Public: Overrides the `reported_attributes` Reportable concern method. + def reported_attributes + [:title, :body] + end + + # Public: Overrides the `reported_searchable_content_extras` Reportable concern method. + def reported_searchable_content_extras + [normalized_author.name] end end end end