module Decidim::Proposals::CommentableProposal

The data store for a Proposal in the Decidim::Proposals component.

Public Instance Methods

accepts_new_comments?() click to toggle source

Public: Overrides the `accepts_new_comments?` Commentable concern method.

# File lib/decidim/proposals/commentable_proposal.rb, line 17
def accepts_new_comments?
  commentable? && !component.current_settings.comments_blocked
end
commentable?() click to toggle source

Public: Overrides the `commentable?` Commentable concern method.

# File lib/decidim/proposals/commentable_proposal.rb, line 12
def commentable?
  component.settings.comments_enabled?
end
comments_have_alignment?() click to toggle source

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

# File lib/decidim/proposals/commentable_proposal.rb, line 22
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/proposals/commentable_proposal.rb, line 27
def comments_have_votes?
  true
end
user_allowed_to_comment?(user) click to toggle source
# File lib/decidim/proposals/commentable_proposal.rb, line 38
def user_allowed_to_comment?(user)
  can_participate_in_space?(user)
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/proposals/commentable_proposal.rb, line 32
def users_to_notify_on_comment_created
  return (followers | component.participatory_space.admins).uniq if official?

  followers
end