Class: Decidim::ParticipatoryProcesses::OrganizationParticipatoryProcesses
- Inherits:
-
Query
- Object
- Query
- Decidim::ParticipatoryProcesses::OrganizationParticipatoryProcesses
- Defined in:
- app/queries/decidim/participatory_processes/organization_participatory_processes.rb
Overview
This query class filters all processes given an organization.
Instance Method Summary collapse
-
#initialize(organization) ⇒ OrganizationParticipatoryProcesses
constructor
A new instance of OrganizationParticipatoryProcesses.
- #query ⇒ Object
Constructor Details
#initialize(organization) ⇒ OrganizationParticipatoryProcesses
Returns a new instance of OrganizationParticipatoryProcesses.
7 8 9 |
# File 'app/queries/decidim/participatory_processes/organization_participatory_processes.rb', line 7 def initialize(organization) @organization = organization end |
Instance Method Details
#query ⇒ Object
11 12 13 |
# File 'app/queries/decidim/participatory_processes/organization_participatory_processes.rb', line 11 def query Decidim::ParticipatoryProcess.where(organization: @organization).order(weight: :asc) end |