1
0
Fork 0
mirror of https://github.com/paper-trail-gem/paper_trail.git synced 2022-11-09 11:33:19 -05:00

Fix deprecation warning re: represent_boolean_as_integer

This commit is contained in:
Jared Beck 2020-05-03 00:54:11 -04:00
parent 6db86e621f
commit 6ceaa0d922

View file

@ -43,7 +43,10 @@ module Dummy
end
end
if ::ENV["DB"] == "sqlite" && ::Rails.gem_version >= ::Gem::Version.new("5.2")
# In rails >= 6.0, "`.represent_boolean_as_integer=` is now always true,
# so setting this is deprecated and will be removed in Rails 6.1."
if ::ENV["DB"] == "sqlite" &&
::Gem::Requirement.new("~> 5.2").satisfied_by?(::Rails.gem_version)
config.active_record.sqlite3.represent_boolean_as_integer = true
end
end