Class: Decidim::Votings::Admin::MonitoringCommitteeMemberForm

Inherits:
Form
  • Object
show all
Defined in:
decidim-elections/app/forms/decidim/votings/admin/monitoring_committee_member_form.rb

Instance Method Summary collapse

Instance Method Details

#map_model(model) ⇒ Object


16
17
18
19
# File 'decidim-elections/app/forms/decidim/votings/admin/monitoring_committee_member_form.rb', line 16

def map_model(model)
  self.user_id = model.decidim_user_id
  self.existing_user = user_id.present?
end

#userObject


21
22
23
# File 'decidim-elections/app/forms/decidim/votings/admin/monitoring_committee_member_form.rb', line 21

def user
  @user ||= current_organization.users.find_by(id: user_id)
end