Class: Decidim::InviteUserAgain
- Inherits:
-
Command
- Object
- Command
- Decidim::InviteUserAgain
- Defined in:
- decidim-core/app/commands/decidim/invite_user_again.rb
Overview
A command with the business logic to invite an user to an organization.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(user, instructions) ⇒ InviteUserAgain
constructor
Public: Initializes the command.
Constructor Details
#initialize(user, instructions) ⇒ InviteUserAgain
Public: Initializes the command.
user - The user that receives the invitation instructions. instructions - The invitation instructions that is sent to the user.
10 11 12 13 |
# File 'decidim-core/app/commands/decidim/invite_user_again.rb', line 10 def initialize(user, instructions) @user = user @instructions = instructions end |
Instance Method Details
#call ⇒ Object
15 16 17 18 |
# File 'decidim-core/app/commands/decidim/invite_user_again.rb', line 15 def call user.invite!(user.invited_by, invitation_instructions: instructions) broadcast(:ok) end |