Class: Decidim::Kids::Admin::SaveParticipatorySpaceConfig
- Inherits:
-
Command
- Object
- Command
- Decidim::Kids::Admin::SaveParticipatorySpaceConfig
- Defined in:
- app/commands/decidim/kids/admin/save_participatory_space_config.rb
Overview
A command to save the participatory space minor configuration.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(form, participatory_space) ⇒ SaveParticipatorySpaceConfig
constructor
A new instance of SaveParticipatorySpaceConfig.
Constructor Details
#initialize(form, participatory_space) ⇒ SaveParticipatorySpaceConfig
Returns a new instance of SaveParticipatorySpaceConfig.
8 9 10 11 |
# File 'app/commands/decidim/kids/admin/save_participatory_space_config.rb', line 8 def initialize(form, participatory_space) @form = form @participatory_space = participatory_space end |
Instance Method Details
#call ⇒ Object
13 14 15 16 17 18 19 20 |
# File 'app/commands/decidim/kids/admin/save_participatory_space_config.rb', line 13 def call return broadcast(:invalid) if participatory_space.blank? return broadcast(:invalid) if form.invalid? save_config broadcast(:ok) end |