Class: Decidim::Votings::Admin::VotingUserRoleForm
- Inherits:
-
Form
- Object
- Form
- Decidim::Votings::Admin::VotingUserRoleForm
- Defined in:
- app/forms/decidim/votings/admin/voting_user_role_form.rb
Instance Method Summary collapse
Instance Method Details
#map_model(model) ⇒ Object
16 17 18 19 |
# File 'app/forms/decidim/votings/admin/voting_user_role_form.rb', line 16 def map_model(model) self.user_id = model.decidim_user_id self.existing_user = user_id.present? end |
#user ⇒ Object
21 22 23 |
# File 'app/forms/decidim/votings/admin/voting_user_role_form.rb', line 21 def user @user ||= current_organization.users.find_by(id: user_id) end |