Class: Decidim::Elections::Admin::TrusteesParticipatorySpaceForm
- Inherits:
-
Form
- Object
- Form
- Decidim::Elections::Admin::TrusteesParticipatorySpaceForm
- Defined in:
- 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 'app/forms/decidim/elections/admin/trustees_participatory_space_form.rb', line 12 def map_model(trustee) self.user_id = trustee.decidim_user_id end |
#user ⇒ Object
16 17 18 |
# File 'app/forms/decidim/elections/admin/trustees_participatory_space_form.rb', line 16 def user @user ||= current_organization.users.find_by(id: user_id) end |