Class: Decidim::Kids::DestroyMinorAccount

Inherits:
Command
  • Object
show all
Defined in:
app/commands/decidim/kids/destroy_minor_account.rb

Overview

This command destroys the minor’s account. If a minor user is not confirmed (never logged), the minor user is hard destroys. If it has been confirmed, soft-destroys

Instance Method Summary collapse

Constructor Details

#initialize(minor_user, minor_account) ⇒ DestroyMinorAccount

Returns a new instance of DestroyMinorAccount.



9
10
11
12
# File 'app/commands/decidim/kids/destroy_minor_account.rb', line 9

def initialize(minor_user, )
  @minor_user = minor_user
  @minor_account = 
end

Instance Method Details

#callObject



14
15
16
17
18
19
20
21
# File 'app/commands/decidim/kids/destroy_minor_account.rb', line 14

def call
  transaction do
    
    destroy_minor_user
  end

  broadcast(:ok)
end