Class: Decidim::Admin::ParticipatorySpace::PublishAllMembers
- Inherits:
-
Command
- Object
- Command
- Decidim::Admin::ParticipatorySpace::PublishAllMembers
- Defined in:
- app/commands/decidim/admin/participatory_space/publish_all_members.rb
Instance Method Summary collapse
-
#call ⇒ Object
Executes the command.
-
#initialize(participatory_space, current_user) ⇒ PublishAllMembers
constructor
Public: Initializes the command.
Constructor Details
#initialize(participatory_space, current_user) ⇒ PublishAllMembers
Public: Initializes the command.
participatory_space - the participatory space current_user - the current user
11 12 13 14 |
# File 'app/commands/decidim/admin/participatory_space/publish_all_members.rb', line 11 def initialize(participatory_space, current_user) @participatory_space = participatory_space @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.
22 23 24 25 26 27 28 |
# File 'app/commands/decidim/admin/participatory_space/publish_all_members.rb', line 22 def call publish_all create_action_log broadcast(:ok) rescue ActiveRecord::RecordInvalid broadcast(:invalid) end |