Sha256: fd5535b0e65c842258c9c8d55020e5a1137917eaa9a3fad7315f51ca8589a25e

Contents?: true

Size: 1.08 KB

Versions: 60

Compression:

Stored size: 1.08 KB

Contents

# frozen_string_literal: true

module Decidim
  module Conferences
    module Admin
      # This class contains helpers needed to format ParticipatoryProcesses
      # in order to use them in select forms for ConferenceParticipatoryProcess.
      #
      module ConferencesHelper
        # Public: A formatted collection of ParticipatoryProcesses to be used
        # in forms.
        def processes_selected
          if current_conference.present?
            @processes_selected ||= current_conference.linked_participatory_space_resources(:participatory_processes, "included_participatory_processes").pluck(:id)
          end
        end

        def assemblies_selected
          @assemblies_selected ||= current_conference.linked_participatory_space_resources(:assemblies, "included_assemblies").pluck(:id) if current_conference.present?
        end

        def consultations_selected
          @consultations_selected ||= current_conference.linked_participatory_space_resources("Consultations", "included_consultations").pluck(:id) if current_conference.present?
        end
      end
    end
  end
end

Version data entries

60 entries across 60 versions & 1 rubygems

Version Path
decidim-conferences-0.27.9 app/helpers/decidim/conferences/admin/conferences_helper.rb
decidim-conferences-0.27.8 app/helpers/decidim/conferences/admin/conferences_helper.rb
decidim-conferences-0.27.7 app/helpers/decidim/conferences/admin/conferences_helper.rb
decidim-conferences-0.27.6 app/helpers/decidim/conferences/admin/conferences_helper.rb
decidim-conferences-0.26.10 app/helpers/decidim/conferences/admin/conferences_helper.rb
decidim-conferences-0.26.9 app/helpers/decidim/conferences/admin/conferences_helper.rb
decidim-conferences-0.27.5 app/helpers/decidim/conferences/admin/conferences_helper.rb
decidim-conferences-0.26.8 app/helpers/decidim/conferences/admin/conferences_helper.rb
decidim-conferences-0.27.4 app/helpers/decidim/conferences/admin/conferences_helper.rb
decidim-conferences-0.27.3 app/helpers/decidim/conferences/admin/conferences_helper.rb
decidim-conferences-0.26.7 app/helpers/decidim/conferences/admin/conferences_helper.rb
decidim-conferences-0.26.5 app/helpers/decidim/conferences/admin/conferences_helper.rb
decidim-conferences-0.27.2 app/helpers/decidim/conferences/admin/conferences_helper.rb
decidim-conferences-0.27.1 app/helpers/decidim/conferences/admin/conferences_helper.rb
decidim-conferences-0.26.4 app/helpers/decidim/conferences/admin/conferences_helper.rb
decidim-conferences-0.27.0 app/helpers/decidim/conferences/admin/conferences_helper.rb
decidim-conferences-0.26.3 app/helpers/decidim/conferences/admin/conferences_helper.rb
decidim-conferences-0.27.0.rc2 app/helpers/decidim/conferences/admin/conferences_helper.rb
decidim-conferences-0.27.0.rc1 app/helpers/decidim/conferences/admin/conferences_helper.rb
decidim-conferences-0.26.2 app/helpers/decidim/conferences/admin/conferences_helper.rb