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:
parent
6db86e621f
commit
6ceaa0d922
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue