class Decidim::Meetings::Admin::DestroyMeeting
panel.
This command is executed when the user destroys a Meeting from the admin
def call
Destroys the meeting if valid.
def call return broadcast(:invalid, proposals.size) if proposals.any? destroy_meeting broadcast(:ok) end
def destroy_meeting
def destroy_meeting Decidim.traceability.perform_action!( :delete, meeting, current_user ) do meeting.destroy! end end
def initialize(meeting, current_user)
meeting - The current instance of the page to be closed.
Initializes a CloseMeeting Command.
def initialize(meeting, current_user) @meeting = meeting @current_user = current_user end
def proposals
def proposals return [] unless Decidim::Meetings.enable_proposal_linking @proposals ||= meeting.authored_proposals.load end