Sha256: df737869f5ca74b8d45d96d7f4e2dbbabe58b3e190567efdcddcefcbefd85cc3
Contents?: true
Size: 783 Bytes
Versions: 4
Compression:
Stored size: 783 Bytes
Contents
# frozen_string_literal: true module Decidim module Admin # A form object used to create participatory process user roles from the # admin dashboard. # class ParticipatoryProcessUserRoleForm < Form mimic :participatory_process_user_role attribute :name, String attribute :email, String attribute :role, String validates :email, :role, presence: true validates :name, presence: true validates :role, inclusion: { in: ParticipatoryProcessUserRole::ROLES } def roles Decidim::Admin::ParticipatoryProcessUserRole::ROLES.map do |role| [ I18n.t(role, scope: "decidim.admin.models.participatory_process_user_role.roles"), role ] end end end end end
Version data entries
4 entries across 4 versions & 2 rubygems