app/commands/decidim/pages/destroy_page.rb in decidim-pages-0.10.1 vs app/commands/decidim/pages/destroy_page.rb in decidim-pages-0.11.0.pre1

- old
+ new

@@ -1,17 +1,17 @@ # 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. + # 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(feature) - @feature = feature + def initialize(component) + @component = component end def call - Page.where(feature: @feature).destroy_all + Page.where(component: @component).destroy_all broadcast(:ok) end end end end