Sha256: 43eb072632ff50713cdc7ff505a358b138b084aca331629844c3e5d8b3593bf4

Contents?: true

Size: 638 Bytes

Versions: 34

Compression:

Stored size: 638 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.
    #
    # user         - The user that receives the invitation instructions.
    # instructions - The invitation instructions that is sent to the user.
    def initialize(user, instructions)
      @user = user
      @instructions = instructions
    end

    def call
      user.invite!(user.invited_by, invitation_instructions: instructions)
      broadcast(:ok)
    end

    private

    attr_reader :user, :instructions
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
decidim-core-0.26.10 app/commands/decidim/invite_user_again.rb
decidim-core-0.26.9 app/commands/decidim/invite_user_again.rb
decidim-core-0.26.8 app/commands/decidim/invite_user_again.rb
decidim-core-0.26.7 app/commands/decidim/invite_user_again.rb
decidim-core-0.26.5 app/commands/decidim/invite_user_again.rb
decidim-core-0.26.4 app/commands/decidim/invite_user_again.rb
decidim-core-0.26.3 app/commands/decidim/invite_user_again.rb
decidim-core-0.26.2 app/commands/decidim/invite_user_again.rb
decidim-core-0.26.1 app/commands/decidim/invite_user_again.rb
decidim-core-0.26.0 app/commands/decidim/invite_user_again.rb
decidim-core-0.26.0.rc2 app/commands/decidim/invite_user_again.rb
decidim-core-0.26.0.rc1 app/commands/decidim/invite_user_again.rb
decidim-core-0.25.2 app/commands/decidim/invite_user_again.rb
decidim-core-0.25.1 app/commands/decidim/invite_user_again.rb
decidim-core-0.25.0 app/commands/decidim/invite_user_again.rb
decidim-core-0.25.0.rc4 app/commands/decidim/invite_user_again.rb
decidim-core-0.25.0.rc3 app/commands/decidim/invite_user_again.rb
decidim-core-0.25.0.rc2 app/commands/decidim/invite_user_again.rb
decidim-core-0.25.0.rc1 app/commands/decidim/invite_user_again.rb
decidim-core-0.24.3 app/commands/decidim/invite_user_again.rb