Sha256: 2a57c1c97c33cd4614cc0e47898642c1f8f4b4cde53188ac9134f5b31d3e61c5
Contents?: true
Size: 452 Bytes
Versions: 30
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 < Decidim::Command def initialize(component) @component = component end def call Page.where(component: @component).destroy_all broadcast(:ok) end end end end
Version data entries
30 entries across 30 versions & 1 rubygems