Sha256: 97e536e2a2f45d3e729b84b2292834db4b1c79d90ff27dac5f9bd38268750058

Contents?: true

Size: 438 Bytes

Versions: 56

Compression:

Stored size: 438 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Pages
    # Command that gets called when the page of this feature needs to be
    # destroyed. It usually happens as a callback when the feature is removed.
    class DestroyPage < Rectify::Command
      def initialize(feature)
        @feature = feature
      end

      def call
        Page.where(feature: @feature).destroy_all
        broadcast(:ok)
      end
    end
  end
end

Version data entries

56 entries across 56 versions & 2 rubygems

Version Path
decidim-pages-0.10.1 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.10.0 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.9.3 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.9.2 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.9.1 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.9.0 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.8.4 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.8.3 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.8.2 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.8.1 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.8.0 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.7.4 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.7.3 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.7.2 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.7.1 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.7.0 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.6.8 app/commands/decidim/pages/destroy_page.rb
decidim-0.6.8 decidim-pages/app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.6.7 app/commands/decidim/pages/destroy_page.rb
decidim-0.6.7 decidim-pages/app/commands/decidim/pages/destroy_page.rb