Sha256: 912dc7068a0bcd55311f82756e97c603d860034d56ee753682c47a2c2866c92e
Contents?: true
Size: 528 Bytes
Versions: 17
Compression:
Stored size: 528 Bytes
Contents
# frozen_string_literal: true module Decidim module ParticipatoryProcesses # This query class filters participatory processes given a current_user. class VisibleParticipatoryProcesses < Rectify::Query def initialize(current_user) @current_user = current_user end def query processes = Decidim::ParticipatoryProcess.all if @current_user processes.visible_for(@current_user.id) else processes.public_spaces end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems