Sha256: 4922566408fd7603068c12873468dadcfd287138530f490e89fa642128af8836
Contents?: true
Size: 602 Bytes
Versions: 35
Compression:
Stored size: 602 Bytes
Contents
# frozen_string_literal: true module Decidim # A command with the business logic to invite an user to an organization. class InviteUserAgain < Rectify::Command # Public: Initializes the command. # # form - A form object with the params. def initialize(user, instructions) @user = user @instructions = instructions end def call return broadcast(:invalid) unless user&.invited_to_sign_up? user.invite!(user.invited_by, invitation_instructions: instructions) broadcast(:ok) end private attr_reader :user, :instructions end end
Version data entries
35 entries across 35 versions & 1 rubygems