Module: Decidim::Admin::ProcessGroupsForSelectHelper
- Defined in:
- decidim-admin/app/helpers/decidim/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.
13 14 15 16 17 18 |
# File 'decidim-admin/app/helpers/decidim/admin/process_groups_for_select_helper.rb', line 13 def process_groups_for_select @process_groups_for_select ||= OrganizationParticipatoryProcessGroups.new(current_organization).map do |group| [translated_attribute(group.name), group.id] end end |