Sha256: c84a448b43d42f1c4708ef1f1070f9cc189112aee6099c3f1c698faf72c7259b
Contents?: true
Size: 575 Bytes
Versions: 7
Compression:
Stored size: 575 Bytes
Contents
# frozen_string_literal: true module Decidim module ActionDelegator class DelegatesVotesByQuestion < Rectify::Query def initialize(question) @question = question end def query DelegationVotes.new.query .merge(question.votes) .merge(consultation_delegations) .distinct.count(:granter_id) end private attr_reader :question def consultation_delegations ConsultationDelegations.for(question.consultation) end end end end
Version data entries
7 entries across 7 versions & 1 rubygems