Skip to content

Commit

Permalink
Move config.to_prepare in the initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
alecslupu committed Apr 5, 2024
1 parent 49f1a8a commit c6313b3
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions lib/decidim/phone_authorization_handler/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ module PhoneAuthorizationHandler
class Engine < ::Rails::Engine
isolate_namespace Decidim::PhoneAuthorizationHandler

config.to_prepare do
Decidim::Proposals::ProposalSerializer.prepend(Decidim::PhoneAuthorizationHandler::Extends::ProposalSerializerExtend)
initializer "decidim.phone_authorization_handler" do
config.to_prepare do
Decidim::Proposals::ProposalSerializer.prepend(Decidim::PhoneAuthorizationHandler::Extends::ProposalSerializerExtend)

Decidim::Exporters::CSV.prepend(Decidim::PhoneAuthorizationHandler::Extends::CSVExporterExtend)
Decidim::Exporters::Excel.prepend(Decidim::PhoneAuthorizationHandler::Extends::ExcelExporterExtend)
Decidim::Exporters::JSON.prepend(Decidim::PhoneAuthorizationHandler::Extends::JSONExporterExtend)
Decidim::Exporters::CSV.prepend(Decidim::PhoneAuthorizationHandler::Extends::CSVExporterExtend)
Decidim::Exporters::Excel.prepend(Decidim::PhoneAuthorizationHandler::Extends::ExcelExporterExtend)
Decidim::Exporters::JSON.prepend(Decidim::PhoneAuthorizationHandler::Extends::JSONExporterExtend)
end
end
end
end
Expand Down

0 comments on commit c6313b3

Please sign in to comment.