Skip to content

Commit

Permalink
Merge pull request #106 from zackgilbert/zackgilbert-patch-optional-s…
Browse files Browse the repository at this point in the history
…qlite3_production_warning

Add conditional check for sqlite3_production_warning before setting to false in railtie.rb
  • Loading branch information
oldmoe authored Apr 20, 2024
2 parents a01a616 + c01d738 commit aa663a7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/litestack/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@
module Litestack
class Railtie < ::Rails::Railtie
initializer :disable_production_sqlite_warning do |app|
# The whole point of this gem is to use sqlite3 in production.
app.config.active_record.sqlite3_production_warning = false
if 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
end
end
end

0 comments on commit aa663a7

Please sign in to comment.