From 9682b9256b59629601fe0dc7534987ab2d06fb6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Turbelin?= Date: Wed, 2 Feb 2022 21:45:11 +0100 Subject: [PATCH] Arrange classes loading for good migration --- db/migrate/20220105085729_split_customers_name.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/db/migrate/20220105085729_split_customers_name.rb b/db/migrate/20220105085729_split_customers_name.rb index d52d619747..4d8ddd5349 100644 --- a/db/migrate/20220105085729_split_customers_name.rb +++ b/db/migrate/20220105085729_split_customers_name.rb @@ -1,9 +1,9 @@ -require 'concerns/address_display' -require 'spree/address' - class SplitCustomersName < ActiveRecord::Migration[6.1] + class Spree::DummyAddress < ApplicationRecord + self.table_name = 'spree_addresses' + end class Customer < ApplicationRecord - belongs_to :bill_address, class_name: "Spree::Address" + belongs_to :bill_address, class_name: "Spree::DummyAddress" end def up