Class: Decidim::Kids::DestroyMinorAccount
- Inherits:
-
Command
- Object
- Command
- Decidim::Kids::DestroyMinorAccount
- 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
- #call ⇒ Object
-
#initialize(minor_user, minor_account) ⇒ DestroyMinorAccount
constructor
A new instance of DestroyMinorAccount.
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_account) @minor_user = minor_user @minor_account = minor_account end |
Instance Method Details
#call ⇒ Object
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_account destroy_minor_user end broadcast(:ok) end |