Sha256: 01d0c0e02b7aaf26a113e48c61db431cbb54e256665ebad0830723e668f00627
Contents?: true
Size: 721 Bytes
Versions: 19
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 < Decidim::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
19 entries across 19 versions & 1 rubygems