Skip to content

Commit

Permalink
Disable deprecation warning for Rails 6 in DummyApp
Browse files Browse the repository at this point in the history
`.represent_boolean_as_integer=` is always true. Setting this is
deprecated and will be removed in Rails 6.1
  • Loading branch information
cedum committed Sep 26, 2019
1 parent b76c1dd commit 5e26b9f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/lib/spree/testing_support/dummy_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
require 'solidus_core'

RAILS_52_OR_ABOVE = Gem::Version.new(Rails.version) >= Gem::Version.new('5.2')
RAILS_6_OR_ABOVE = Gem::Version.new(Rails.version) >= Gem::Version.new('6.0')

# @private
class ApplicationController < ActionController::Base
Expand Down Expand Up @@ -64,7 +65,9 @@ class Application < ::Rails::Application

if RAILS_52_OR_ABOVE
config.action_controller.default_protect_from_forgery = true
config.active_record.sqlite3.represent_boolean_as_integer = true
unless RAILS_6_OR_ABOVE
config.active_record.sqlite3.represent_boolean_as_integer = true
end
end

# Avoid issues if an old spec/dummy still exists
Expand Down

0 comments on commit 5e26b9f

Please sign in to comment.