Sha256: d06a7d51bcdc23c2dd7972bd7196e16ed139910a7430b8eee133ff7280eedb96
Contents?: true
Size: 645 Bytes
Versions: 6
Compression:
Stored size: 645 Bytes
Contents
# frozen_string_literal: true module Decidim module ParticipatoryProcesses module Admin # A command that deletes a participatory process step class DestroyParticipatoryProcessStep < Decidim::Commands::DestroyResource private def participatory_process = resource.participatory_space def invalid? participatory_process.steps.count > 1 && resource.active? end def run_after_hooks steps = participatory_process.steps.reload ReorderParticipatoryProcessSteps .new(steps, steps.map(&:id)) .call end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems