Class: Decidim::DecidimAwesome::AwesomeProcessesQuery
- Inherits:
-
Object
- Object
- Decidim::DecidimAwesome::AwesomeProcessesQuery
- Defined in:
- app/queries/decidim/decidim_awesome/awesome_processes_query.rb
Overview
Query class responsible for fetching participatory processes based on content block settings.
Process types:
- "processes": only processes WITHOUT a group
- "groups": only processes WITH a group (optionally restricted to a specific group)
- "all": all processes regardless of group membership
Instance Method Summary collapse
-
#initialize(organization, current_user, settings) ⇒ AwesomeProcessesQuery
constructor
A new instance of AwesomeProcessesQuery.
- #results ⇒ Object
Constructor Details
#initialize(organization, current_user, settings) ⇒ AwesomeProcessesQuery
Returns a new instance of AwesomeProcessesQuery.
13 14 15 16 17 |
# File 'app/queries/decidim/decidim_awesome/awesome_processes_query.rb', line 13 def initialize(organization, current_user, settings) @organization = organization @current_user = current_user @settings = settings end |
Instance Method Details
#results ⇒ Object
19 20 21 22 23 24 25 26 |
# File 'app/queries/decidim/decidim_awesome/awesome_processes_query.rb', line 19 def results case settings.selection_criteria when "manual" manual_selection else automatic_selection end end |