Sha256: e8b7a2347af567d30c319acae82deecf0dbb22b6ac5c15bd16c5c95d9a7ca1b7

Contents?: true

Size: 437 Bytes

Versions: 17

Compression:

Stored size: 437 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

17 entries across 17 versions & 2 rubygems

Version Path
decidim-pages-0.1.0 app/commands/decidim/pages/destroy_page.rb
decidim-0.1.0 decidim-pages/app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.0.8.1 app/commands/decidim/pages/destroy_page.rb
decidim-0.0.8.1 decidim-pages/app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.0.7 app/commands/decidim/pages/destroy_page.rb
decidim-0.0.7 decidim-pages/app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.0.6 app/commands/decidim/pages/destroy_page.rb
decidim-0.0.6 decidim-pages/app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.0.5 app/commands/decidim/pages/destroy_page.rb
decidim-0.0.5 decidim-pages/app/commands/decidim/pages/destroy_page.rb
decidim-0.0.4 decidim-pages/app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.0.3 app/commands/decidim/pages/destroy_page.rb
decidim-0.0.3 decidim-pages/app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.0.2 app/commands/decidim/pages/destroy_page.rb
decidim-0.0.2 decidim-pages/app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.0.1 app/commands/decidim/pages/destroy_page.rb
decidim-0.0.1 decidim-pages/app/commands/decidim/pages/destroy_page.rb