Class: Decidim::ParticipatoryProcesses::OrganizationPublishedParticipatoryProcesses
- Inherits:
-
Query
- Object
- Query
- Decidim::ParticipatoryProcesses::OrganizationPublishedParticipatoryProcesses
- Defined in:
- app/queries/decidim/participatory_processes/organization_published_participatory_processes.rb
Overview
This query class filters published processes given an organization.
Instance Method Summary collapse
-
#initialize(organization, user = nil) ⇒ OrganizationPublishedParticipatoryProcesses
constructor
A new instance of OrganizationPublishedParticipatoryProcesses.
- #query ⇒ Object
Constructor Details
#initialize(organization, user = nil) ⇒ OrganizationPublishedParticipatoryProcesses
Returns a new instance of OrganizationPublishedParticipatoryProcesses.
7 8 9 10 |
# File 'app/queries/decidim/participatory_processes/organization_published_participatory_processes.rb', line 7 def initialize(organization, user = nil) @organization = organization @user = user end |
Instance Method Details
#query ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/queries/decidim/participatory_processes/organization_published_participatory_processes.rb', line 12 def query Decidim::Query.merge( OrganizationParticipatoryProcesses.new(@organization), VisibleParticipatoryProcesses.new(@user), PublishedParticipatoryProcesses.new ).query.order(weight: :asc) end |