Class: Decidim::Votings::Admin::DestroyMonitoringCommitteeMember
- Inherits:
-
Command
- Object
- Command
- Decidim::Votings::Admin::DestroyMonitoringCommitteeMember
- Defined in:
- app/commands/decidim/votings/admin/destroy_monitoring_committee_member.rb
Overview
A command with the business logic to destroy a monitoring committee member
Instance Method Summary collapse
-
#call ⇒ Object
Executes the command.
-
#initialize(monitoring_committee_member, current_user) ⇒ DestroyMonitoringCommitteeMember
constructor
Public: Initializes the command.
Constructor Details
#initialize(monitoring_committee_member, current_user) ⇒ DestroyMonitoringCommitteeMember
Public: Initializes the command.
monitoring_committee_member - the MonitoringCommitteeMember to destroy current_user - the user performing this action
12 13 14 15 |
# File 'app/commands/decidim/votings/admin/destroy_monitoring_committee_member.rb', line 12 def initialize(monitoring_committee_member, current_user) @monitoring_committee_member = monitoring_committee_member @current_user = current_user end |
Instance Method Details
#call ⇒ Object
Executes the command. Broadcasts these events:
-
:ok when everything is valid.
-
:invalid if the form was not valid and we could not proceed.
Returns nothing.
23 24 25 26 |
# File 'app/commands/decidim/votings/admin/destroy_monitoring_committee_member.rb', line 23 def call destroy_monitoring_committee_member! broadcast(:ok) end |