Sha256: f9e1534c4d7a79acbbe6a6bf6999739d967729e8342df24ab41fce7f7e0560f0

Contents?: true

Size: 697 Bytes

Versions: 72

Compression:

Stored size: 697 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.name), group.id]
            end
        end
      end
    end
  end
end

Version data entries

72 entries across 72 versions & 2 rubygems

Version Path
decidim-participatory_processes-0.23.6 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.23.5 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.23.4 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.23.3 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.23.2 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.23.1 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.23.1.rc1 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.23.0 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.22.0 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.21.0 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.20.1 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.20.0 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.19.1 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.18.1 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.19.0 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.17.2 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.18.0 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.17.1 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.16.1 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb
decidim-participatory_processes-0.17.0 app/helpers/decidim/participatory_processes/admin/process_groups_for_select_helper.rb