Skip to content

Commit

Permalink
[Ruby on Rails] Wrap the SQLite configuration for supported versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Arne De Herdt committed Sep 16, 2022
1 parent 75799f1 commit 463c6d1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/dummy/config/initializers/sqlite3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@

# Enforce booleans to represented as integers in the database.
# This was an old SQLite feature that we do not want to support anymore.
::Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true
# Note: This is only for older versions of Sqlite3, the configuration option was dropped at some point
if ::Rails.application.config.active_record.sqlite3.respond_to?(:represent_boolean_as_integer)
::Rails.application.config.active_record.sqlite3.represent_boolean_as_integer = true
end

0 comments on commit 463c6d1

Please sign in to comment.