Skip to content

Commit

Permalink
Fix controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
alecslupu committed Dec 8, 2023
1 parent ced6422 commit d0a1691
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/decidim/custom_proposal_states/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ class Engine < ::Rails::Engine
Decidim::Elections::Admin::ImportProposalsToElections.prepend Decidim::CustomProposalStates::Overrides::ImportProposalsToElections
end
end
initializer "decidim_custom_proposal_states.action_controller", after: "decidim.action_controller" do
config.to_prepare do
ActiveSupport.on_load :action_controller do
Decidim::Proposals::Admin::ProposalsController.prepend Decidim::CustomProposalStates::Overrides::AdminFilterable
end
end
end

initializer "decidim_custom_proposal_states.overrides.proposal" do
Rails.application.reloader.to_prepare do
Expand All @@ -65,9 +72,6 @@ class Engine < ::Rails::Engine
Decidim::Proposals::Admin::AnswerProposal.prepend Decidim::CustomProposalStates::Overrides::AnswerProposal
Decidim::Proposals::Admin::NotifyProposalAnswer.prepend Decidim::CustomProposalStates::Overrides::NotifyProposalAnswer
Decidim::Proposals::Import::ProposalAnswerCreator.prepend Decidim::CustomProposalStates::Overrides::ProposalAnswerCreator

Decidim::Proposals::Admin::ProposalsController.helper Decidim::LayoutHelper
Decidim::Proposals::Admin::ProposalsController.prepend Decidim::CustomProposalStates::Overrides::AdminFilterable
end
end
end
Expand Down

0 comments on commit d0a1691

Please sign in to comment.