Sha256: 3d271b72232d5dadd86b2408be76d7cd937a3786cc03de4e744e266d0133731b
Contents?: true
Size: 792 Bytes
Versions: 53
Compression:
Stored size: 792 Bytes
Contents
# frozen_string_literal: true module Decidim module Meetings module Admin # A form object used to invite users to join a meeting. # class MeetingRegistrationInviteForm < Form attribute :name, String attribute :email, String attribute :user_id, Integer attribute :existing_user, Boolean, default: false validates :name, presence: true, unless: proc { |object| object.existing_user } validates :email, presence: true, 'valid_email_2/email': { disposable: true }, unless: proc { |object| object.existing_user } validates :user, presence: true, if: proc { |object| object.existing_user } def user @user ||= current_organization.users.find_by(id: user_id) end end end end end
Version data entries
53 entries across 53 versions & 1 rubygems