Class: Decidim::Meetings::Admin::CloseMeetingForm

Inherits:
Form
  • Object
show all
Includes:
TranslatableAttributes
Defined in:
decidim-meetings/app/forms/decidim/meetings/admin/close_meeting_form.rb

Overview

This class holds a Form to close a meeting from Decidim’s admin panel.

Instance Method Summary collapse

Methods inherited from Form

#available_locales

Instance Method Details

#map_model(model) ⇒ Object

Private: Gets the proposals from the meeting and injects them to the form.

Returns nothing.



26
27
28
29
# File 'decidim-meetings/app/forms/decidim/meetings/admin/close_meeting_form.rb', line 26

def map_model(model)
  self.proposal_ids = model.linked_resources(:proposals, "proposals_from_meeting").pluck(:id)
  self.proposals = model.sibling_scope(:proposals)
end