Apply Rails 4 patch at boot time not only specs

This makes this patch available also for things like database-related
rake tasks. It moves the patch to an initializer.
This commit is contained in:
Pau Perez
2018-01-24 16:28:20 +01:00
committed by Maikel Linke
parent b70edd5424
commit 719c45b408
2 changed files with 0 additions and 4 deletions

View File

@@ -6,7 +6,6 @@
# See:
# - https://github.com/matthuhiggins/foreigner/issues/61
# - https://github.com/garysweaver/rails/commit/9bb27f7ffe3eb732df737e477cd8fc25e007f77b
if Rails::VERSION::MAJOR < 4
class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
def disable_referential_integrity #:nodoc:

View File

@@ -48,9 +48,6 @@ Capybara.default_max_wait_time = 30
require "paperclip/matchers"
#Fix fixtures with foreign keys, fixed in Rails4
require_relative "support/active_record_postgresql_referential_integrity_patch"
# Override setting in Spree engine: Spree::Core::MailSettings
ActionMailer::Base.default_url_options[:host] = 'test.host'