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