Module: Decidim::Conferences::Admin::ConferencesHelper

Defined in:
decidim-conferences/app/helpers/decidim/conferences/admin/conferences_helper.rb

Overview

This class contains helpers needed to format ParticipatoryProcesses in order to use them in select forms for ConferenceParticipatoryProcess.

Instance Method Summary collapse

Instance Method Details

#assemblies_selectedObject


18
19
20
# File 'decidim-conferences/app/helpers/decidim/conferences/admin/conferences_helper.rb', line 18

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

#consultations_selectedObject


22
23
24
# File 'decidim-conferences/app/helpers/decidim/conferences/admin/conferences_helper.rb', line 22

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

#processes_selectedObject

Public: A formatted collection of ParticipatoryProcesses to be used in forms.


12
13
14
15
16
# File 'decidim-conferences/app/helpers/decidim/conferences/admin/conferences_helper.rb', line 12

def processes_selected
  if current_conference.present?
    @processes_selected ||= current_conference.linked_participatory_space_resources(:participatory_processes, "included_participatory_processes").pluck(:id)
  end
end