app/models/decidim/blogs/post.rb in decidim-blogs-0.26.7 vs app/models/decidim/blogs/post.rb in decidim-blogs-0.26.8
- 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"
@@ -62,9 +63,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