Sha256: c5c4e5d81766fd65b10fa9f0489ed00535437c3c73cf8dbfdd42af8d95ee39a9

Contents?: true

Size: 489 Bytes

Versions: 7

Compression:

Stored size: 489 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Meetings
    module Admin
      # This command is executed when the user destroys a Meeting from the admin
      # panel.
      class DestroyMeeting < Decidim::Commands::DestroyResource
        protected

        def invalid? = proposals.any?

        def proposals
          return [] unless Decidim::Meetings.enable_proposal_linking

          @proposals ||= resource.authored_proposals.load
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
decidim-meetings-0.29.2 app/commands/decidim/meetings/admin/destroy_meeting.rb
decidim-meetings-0.29.1 app/commands/decidim/meetings/admin/destroy_meeting.rb
decidim-meetings-0.29.0 app/commands/decidim/meetings/admin/destroy_meeting.rb
decidim-meetings-0.29.0.rc4 app/commands/decidim/meetings/admin/destroy_meeting.rb
decidim-meetings-0.29.0.rc3 app/commands/decidim/meetings/admin/destroy_meeting.rb
decidim-meetings-0.29.0.rc2 app/commands/decidim/meetings/admin/destroy_meeting.rb
decidim-meetings-0.29.0.rc1 app/commands/decidim/meetings/admin/destroy_meeting.rb