Method: Decidim::Plans::Admin::UpdateSections#call
- Defined in:
- app/commands/decidim/plans/admin/update_sections.rb
#call ⇒ Object
Updates the sections if valid.
Broadcasts :ok if successful, :invalid otherwise.
23 24 25 26 27 28 29 30 31 |
# File 'app/commands/decidim/plans/admin/update_sections.rb', line 23 def call return broadcast(:invalid) if @form.invalid? Decidim::Plans::Section.transaction do update_sections end broadcast(:ok) end |