Class: Decidim::TimeTracker::Admin::DestroyAssignation
- Inherits:
-
Rectify::Command
- Object
- Rectify::Command
- Decidim::TimeTracker::Admin::DestroyAssignation
- Defined in:
- app/commands/decidim/time_tracker/admin/destroy_assignation.rb
Overview
A command with all the business logic when updating an activity
Instance Method Summary collapse
-
#call ⇒ Object
Executes the command.
-
#initialize(assignation, user) ⇒ DestroyAssignation
constructor
Public: Initializes the command.
Constructor Details
#initialize(assignation, user) ⇒ DestroyAssignation
Public: Initializes the command.
form - A form object with the params.
11 12 13 14 |
# File 'app/commands/decidim/time_tracker/admin/destroy_assignation.rb', line 11 def initialize(assignation, user) @assignation = assignation @user = user end |
Instance Method Details
#call ⇒ Object
Executes the command. Broadcasts these events:
-
:ok when everything is valid.
-
:invalid if the form wasn’t valid and we couldn’t proceed.
Returns nothing.
22 23 24 25 |
# File 'app/commands/decidim/time_tracker/admin/destroy_assignation.rb', line 22 def call destroy_assignation! broadcast(:ok) end |