Module: Decidim::ParticipatoryProcesses::Admin::ProcessGroupsForSelectHelper
- Defined in:
- app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
Overview
This class contains helpers needed to format ParticipatoryProcessGroups in order to use them in select forms.
Instance Method Summary collapse
-
#process_groups_for_select ⇒ Object
Public: A formatted collection of ParticipatoryProcessGroups to be used in forms.
Instance Method Details
#process_groups_for_select ⇒ Object
Public: A formatted collection of ParticipatoryProcessGroups to be used in forms.
Returns an Array.
14 15 16 17 18 19 |
# File 'app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb', line 14 def process_groups_for_select @process_groups_for_select ||= OrganizationParticipatoryProcessGroups.new(current_organization).map do |group| [translated_attribute(group.title), group.id] end end |