Class: Decidim::Elections::Admin::TrusteesParticipatorySpaceForm

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

Overview

This class holds a form to add users as trustees from Decidim's admin panel.

Instance Method Summary collapse

Instance Method Details

#map_model(trustee) ⇒ Object


12
13
14
# File 'decidim-elections/app/forms/decidim/elections/admin/trustees_participatory_space_form.rb', line 12

def map_model(trustee)
  self.user_id = trustee.decidim_user_id
end

#userObject


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

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