mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-20 19:56:48 +00:00
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:
@@ -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:
|
||||
@@ -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'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user