Class: Decidim::Conferences::Admin::RegistrationTypeForm

Inherits:
Form
  • Object
show all
Includes:
ApplicationHelper, TranslatableAttributes
Defined in:
app/forms/decidim/conferences/admin/registration_type_form.rb

Overview

A form object used to create conference registration types from the admin dashboard.

Instance Method Summary collapse

Instance Method Details

#conference_meetingsObject



36
37
38
39
40
41
# File 'app/forms/decidim/conferences/admin/registration_type_form.rb', line 36

def conference_meetings
  meeting_components = current_participatory_space.components.where(manifest_name: "meetings")
  return unless meeting_components || conference_meeting_ids.delete("").present?

  @conference_meetings ||= Decidim::ConferenceMeeting.where(component: meeting_components).where(id: conference_meeting_ids)
end

#meetingsObject



24
25
26
27
28
29
30
31
32
33
34
# File 'app/forms/decidim/conferences/admin/registration_type_form.rb', line 24

def meetings
  meeting_components = current_participatory_space.components.where(manifest_name: "meetings")
  @meetings ||= Decidim::ConferenceMeeting.where(component: meeting_components)
                                           &.order(title: :asc)
                                           &.map do |meeting|
                                             OpenStruct.new(
                                               title: present(meeting).title,
                                               value: meeting.id
                                             )
                                           end
end