Sha256: d5207e085e2e42e36cf2ffd8be407fae5b58446f936132a8664fbf7030041701

Contents?: true

Size: 698 Bytes

Versions: 50

Compression:

Stored size: 698 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module ParticipatoryProcesses
    module Admin
      # This class contains helpers needed to format ParticipatoryProcessGroups
      # in order to use them in select forms.
      #
      module ProcessGroupsForSelectHelper
        # Public: A formatted collection of ParticipatoryProcessGroups to be used
        # in forms.
        #
        # Returns an Array.
        def process_groups_for_select
          @process_groups_for_select ||=
            OrganizationParticipatoryProcessGroups.new(current_organization).map do |group|
              [translated_attribute(group.title), group.id]
            end
        end
      end
    end
  end
end

Version data entries

50 entries across 50 versions & 1 rubygems

Version Path
decidim-participatory_processes-0.29.1 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.28.4 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.27.9 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.29.0 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.28.3 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.27.8 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.29.0.rc4 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.29.0.rc3 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.29.0.rc2 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.29.0.rc1 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.28.2 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.27.7 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.28.1 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.27.6 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.26.10 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.26.9 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.28.0 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.27.5 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.28.0.rc5 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.28.0.rc4 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb