Skip to content

Commit

Permalink
fix: Remove extends
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentinchampenois committed Jun 6, 2024
1 parent 600c72a commit 0e6dd26
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 29 deletions.
11 changes: 0 additions & 11 deletions lib/decidim/emitter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,5 @@ module Decidim
# This namespace holds the logic of the `Emitter` component. This component
# allows users to create emitter in a participatory space.
module Emitter
include ActiveSupport::Configurable

# Public: The configuration to exclude extends from the engine.
# [:participatory_process, :participatory_process_form, :participatory_process_create, :participatory_process_copy, :participatory_process_update]
config_accessor :exclude_extends do
[]
end

def self.skip_extend?(extend_sym)
extend_sym.in?(exclude_extends)
end
end
end
18 changes: 0 additions & 18 deletions lib/decidim/emitter/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,6 @@ class Engine < ::Rails::Engine
initializer "Emitter.webpacker.assets_path" do
Decidim.register_assets_path File.expand_path("app/packs", root)
end

initializer "decidim.emitter.overrides" do
config.to_prepare do
Decidim::ParticipatoryProcess.include(Decidim::Emitter::ParticipatoryProcessOverride) unless Decidim::Emitter.skip_extend?(:participatory_process)
unless Decidim::Emitter.skip_extend?(:participatory_process_form)
Decidim::ParticipatoryProcesses::Admin::ParticipatoryProcessForm.include(Decidim::Emitter::Admin::ParticipatoryProcessFormOverride)
end
unless Decidim::Emitter.skip_extend?(:participatory_process_create)
Decidim::ParticipatoryProcesses::Admin::CreateParticipatoryProcess.include(Decidim::Emitter::ParticipatoryProcesses::Admin::CreateParticipatoryProcessOverride)
end
unless Decidim::Emitter.skip_extend?(:participatory_process_copy)
Decidim::ParticipatoryProcesses::Admin::CopyParticipatoryProcess.include(Decidim::Emitter::ParticipatoryProcesses::Admin::CopyParticipatoryProcessOverride)
end
unless Decidim::Emitter.skip_extend?(:participatory_process_update)
Decidim::ParticipatoryProcesses::Admin::UpdateParticipatoryProcess.include(Decidim::Emitter::ParticipatoryProcesses::Admin::UpdateParticipatoryProcessOverride)
end
end
end
end
end
end

0 comments on commit 0e6dd26

Please sign in to comment.