app/commands/decidim/conferences/admin/destroy_conference_admin.rb in decidim-conferences-0.26.10 vs app/commands/decidim/conferences/admin/destroy_conference_admin.rb in decidim-conferences-0.27.0.rc1
- old
+ new
@@ -3,11 +3,11 @@
module Decidim
module Conferences
module Admin
# A command with all the business logic when destroying an conference
# admin in the system.
- class DestroyConferenceAdmin < Rectify::Command
+ class DestroyConferenceAdmin < Decidim::Command
# Public: Initializes the command.
#
# role - the ConferenceUserRole to destroy
# current_user - the user performing this action
def initialize(role, current_user)
@@ -21,20 +21,15 @@
# - :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