Sha256: 1babd17a05909af12700569b7d534d9fd6805a2e64baaee15af512e82379784b
Contents?: true
Size: 559 Bytes
Versions: 6
Compression:
Stored size: 559 Bytes
Contents
# frozen_string_literal: true module Decidim module Admin # A command with all the business logic to destroy an area. class DestroyArea < Decidim::Commands::DestroyResource # 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. def call destroy_resource broadcast(:ok) rescue ActiveRecord::RecordNotDestroyed broadcast(:has_spaces) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems