Module: Decidim::ActionDelegator::DelegationHelper

Defined in:
app/helpers/decidim/action_delegator/delegation_helper.rb

Instance Method Summary collapse

Instance Method Details

#has_any_delegate_vote?(question) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
9
10
# File 'app/helpers/decidim/action_delegator/delegation_helper.rb', line 6

def has_any_delegate_vote?(question)
  Decidim::ActionDelegator::GranteeDelegations.for(question.consultation, current_user).detect do |delegation|
    question.voted_by?(delegation.granter)
  end
end