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