From 1dd0eb0dc9d350999be9d3e94aaebde8b48f83a8 Mon Sep 17 00:00:00 2001 From: Asger Behncke Jacobsen Date: Sun, 25 Aug 2024 00:12:29 +0200 Subject: [PATCH] fix: make it possible to use litestack without active_record --- lib/litestack/railtie.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/litestack/railtie.rb b/lib/litestack/railtie.rb index 818498b..9ea8079 100644 --- a/lib/litestack/railtie.rb +++ b/lib/litestack/railtie.rb @@ -3,7 +3,7 @@ module Litestack class Railtie < ::Rails::Railtie initializer :disable_production_sqlite_warning do |app| - if config.active_record.key?(:sqlite3_production_warning) + if config.respond_to?(:active_record) && config.active_record.key?(:sqlite3_production_warning) # The whole point of this gem is to use sqlite3 in production. app.config.active_record.sqlite3_production_warning = false end