app/commands/decidim/assemblies/admin/destroy_assembly_admin.rb in decidim-assemblies-0.26.7 vs app/commands/decidim/assemblies/admin/destroy_assembly_admin.rb in decidim-assemblies-0.26.8
- old
+ new
@@ -21,15 +21,20 @@
# - :invalid if the form wasn't valid and we couldn't proceed.
#
# Returns nothing.
def call
destroy_role!
+ dispatch_system_event
broadcast(:ok)
end
private
attr_reader :role, :current_user
+
+ def dispatch_system_event
+ ActiveSupport::Notifications.publish("decidim.system.participatory_space.admin.destroyed", role.class.name, role.id)
+ end
def destroy_role!
extra_info = {
resource: {
title: role.user.name