Module: Decidim::Assemblies::Admin::AssembliesHelper
- Defined in:
- app/helpers/decidim/assemblies/admin/assemblies_helper.rb
Overview
This class contains helpers needed to format ParticipatoryProcesses in order to use them in select forms for AssemblyParticipatoryProcess.
Instance Method Summary collapse
-
#parent_assemblies_for_select ⇒ Object
Public: A collection of Assemblies that can be selected as parent assemblies for another assembly; to be used in forms.
-
#processes_selected ⇒ Object
Public: A formatted collection of ParticipatoryProcesses to be used in forms.
Instance Method Details
#parent_assemblies_for_select ⇒ Object
Public: A collection of Assemblies that can be selected as parent assemblies for another assembly; to be used in forms.
20 21 22 |
# File 'app/helpers/decidim/assemblies/admin/assemblies_helper.rb', line 20 def parent_assemblies_for_select @parent_assemblies_for_select ||= ParentAssembliesForSelect.for(current_organization, current_assembly) end |
#processes_selected ⇒ Object
Public: A formatted collection of ParticipatoryProcesses to be used in forms.
12 13 14 15 16 |
# File 'app/helpers/decidim/assemblies/admin/assemblies_helper.rb', line 12 def processes_selected if current_assembly.present? @processes_selected ||= current_assembly.linked_participatory_space_resources(:participatory_processes, "included_participatory_processes").pluck(:id) end end |