From 52a14e80bccf1763ff67c88c553a2764afd722f7 Mon Sep 17 00:00:00 2001 From: takahashim Date: Tue, 29 Oct 2024 00:06:44 +0900 Subject: [PATCH] fix: ignore session_store defined in Decidim::Core::Engine --- config/application.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/config/application.rb b/config/application.rb index 4b170cbaf..c4ce0a44a 100644 --- a/config/application.rb +++ b/config/application.rb @@ -33,5 +33,15 @@ class Application < Rails::Application # Application configuration can go into files in config/initializers # -- all .rb files in that directory are automatically loaded after loading # the framework and any gems in your application. + + # skip `session_store` initializer in Decidim::Core::Engine + config.before_initialize do + Rails.application.initializers.each do |initializer| + if initializer.name == "Expire sessions" + initializer.instance_eval { @options[:group] = :force_skip } + Rails.logger.info "XXX: Skip initializer '#{initializer.name}'" + end + end + end end end