From 430dfa6045a684952423db525088d53ff32dd168 Mon Sep 17 00:00:00 2001 From: Andrew Kerr Date: Mon, 31 Jan 2022 08:58:10 -0500 Subject: [PATCH] Allow middleware that extends ActionDispatch::Session::AbstractSecureStore --- lib/rails_admin/engine.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rails_admin/engine.rb b/lib/rails_admin/engine.rb index ab38c120e6..a3c855de33 100644 --- a/lib/rails_admin/engine.rb +++ b/lib/rails_admin/engine.rb @@ -49,6 +49,7 @@ class Engine < Rails::Engine config.after_initialize do |app| has_session_store = app.config.middleware.to_a.any? do |m| m.klass.try(:<=, ActionDispatch::Session::AbstractStore) || + m.klass.try(:<=, ActionDispatch::Session::AbstractSecureStore) || m.klass.name =~ /^ActionDispatch::Session::/ end loaded = app.config.middleware.to_a.map(&:name)