Skip to content

Commit c01d738

Browse files
authored
Add conditional check for sqlite3_production_warning before setting to false in railtie.rb
As mentioned in #105, the new Rails main (7.2.0-alpha) removes `config.active_record.sqlite3_production_warning` and so the litestack railtie attempt to set it to false fails. This is an attempt to fix that.
1 parent cb0d2fa commit c01d738

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/litestack/railtie.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
module Litestack
44
class Railtie < ::Rails::Railtie
55
initializer :disable_production_sqlite_warning do |app|
6-
# The whole point of this gem is to use sqlite3 in production.
7-
app.config.active_record.sqlite3_production_warning = false
6+
if config.active_record.key?(:sqlite3_production_warning)
7+
# The whole point of this gem is to use sqlite3 in production.
8+
app.config.active_record.sqlite3_production_warning = false
9+
end
810
end
911
end
1012
end

0 commit comments

Comments
 (0)