Sha256: 3da5e75a287c9943f33c196e28b73fa4b74b65593f160055e74a985c2433fd31
Contents?: true
Size: 721 Bytes
Versions: 25
Compression:
Stored size: 721 Bytes
Contents
# frozen_string_literal: true module Decidim module Elections module Trustees # A class used to find trustees by participatory space trustee ids. class ByParticipatorySpaceTrusteeIds < Rectify::Query # Initializes the class. # def initialize(trustee_ids) @trustee_ids = trustee_ids end # Gets trustees by participatory space trustee ids. def query Decidim::Elections::Trustee .includes([:user]) .joins(:trustees_participatory_spaces) .merge(Decidim::Elections::TrusteesParticipatorySpace.where(decidim_elections_trustee_id: @trustee_ids, considered: true)) end end end end end
Version data entries
25 entries across 25 versions & 1 rubygems