module Decidim::EnhancedTextwork::CommentableParagraph

The data store for a Paragraph in the Decidim::EnhancedTextwork component.

Public Instance Methods

comments_have_alignment?() click to toggle source

Public: Overrides the ‘comments_have_alignment?` Commentable concern method.

# File lib/decidim/enhanced_textwork/commentable_paragraph.rb, line 12
def comments_have_alignment?
  true
end
comments_have_votes?() click to toggle source

Public: Overrides the ‘comments_have_votes?` Commentable concern method.

# File lib/decidim/enhanced_textwork/commentable_paragraph.rb, line 17
def comments_have_votes?
  true
end
user_allowed_to_vote_comment?(user) click to toggle source
# File lib/decidim/enhanced_textwork/commentable_paragraph.rb, line 28
def user_allowed_to_vote_comment?(user)
  return unless can_participate_in_space?(user)

  ActionAuthorizer.new(user, "vote_comment", component, self).authorize.ok?
end
users_to_notify_on_comment_created() click to toggle source

Public: Override Commentable concern method ‘users_to_notify_on_comment_created`

# File lib/decidim/enhanced_textwork/commentable_paragraph.rb, line 22
def users_to_notify_on_comment_created
  return (followers | component.participatory_space.admins).uniq if official?

  followers
end