Class: Decidim::ParticipatoryProcesses::OrganizationPrioritizedParticipatoryProcesses
- Inherits:
-
Query
- Object
- Query
- Decidim::ParticipatoryProcesses::OrganizationPrioritizedParticipatoryProcesses
- Defined in:
- app/queries/decidim/participatory_processes/organization_prioritized_participatory_processes.rb
Overview
This query class filters public processes given an organization and a filter in a meaningful prioritized order.
Instance Method Summary collapse
-
#initialize(organization, filter = "active", user = nil) ⇒ OrganizationPrioritizedParticipatoryProcesses
constructor
A new instance of OrganizationPrioritizedParticipatoryProcesses.
- #query ⇒ Object
Constructor Details
#initialize(organization, filter = "active", user = nil) ⇒ OrganizationPrioritizedParticipatoryProcesses
Returns a new instance of OrganizationPrioritizedParticipatoryProcesses.
8 9 10 11 12 |
# File 'app/queries/decidim/participatory_processes/organization_prioritized_participatory_processes.rb', line 8 def initialize(organization, filter = "active", user = nil) @organization = organization @filter = filter @user = user end |
Instance Method Details
#query ⇒ Object
14 15 16 17 18 19 20 |
# File 'app/queries/decidim/participatory_processes/organization_prioritized_participatory_processes.rb', line 14 def query Decidim::Query.merge( OrganizationPublishedParticipatoryProcesses.new(@organization, @user), PrioritizedParticipatoryProcesses.new, FilteredParticipatoryProcesses.new(@filter) ).query end |