app/models/decidim/blogs/post.rb in decidim-blogs-0.22.0 vs app/models/decidim/blogs/post.rb in decidim-blogs-0.23.0
- old
+ new
@@ -12,15 +12,18 @@
include Decidim::Authorable
include Decidim::Comments::Commentable
include Decidim::Searchable
include Decidim::Endorsable
include Decidim::Followable
+ include Decidim::TranslatableResource
include Traceable
include Loggable
component_manifest_name "blogs"
+ translatable_fields :title, :body
+
validates :title, presence: true
scope :created_at_desc, -> { order(arel_table[:created_at].desc) }
searchable_fields(
@@ -59,9 +62,13 @@
can_participate_in_space?(user)
end
def users_to_notify_on_comment_created
followers
+ end
+
+ def attachment_context
+ :admin
end
end
end
end