Sha256: a223dcc26b1414c925cc7f9e5e474c329263d2f8ac0349fb18fb663a325906a5

Contents?: true

Size: 452 Bytes

Versions: 63

Compression:

Stored size: 452 Bytes

Contents

# frozen_string_literal: true

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

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

Version data entries

63 entries across 63 versions & 1 rubygems

Version Path
decidim-pages-0.26.10 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.26.9 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.26.8 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.26.7 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.26.5 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.26.4 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.26.3 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.26.2 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.26.1 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.26.0 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.26.0.rc2 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.26.0.rc1 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.25.2 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.25.1 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.25.0 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.25.0.rc4 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.25.0.rc3 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.25.0.rc2 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.25.0.rc1 app/commands/decidim/pages/destroy_page.rb
decidim-pages-0.24.3 app/commands/decidim/pages/destroy_page.rb