From 721f3c085a652d8d9f538cc76f888f311abc58f4 Mon Sep 17 00:00:00 2001 From: Martin Meyerhoff Date: Tue, 16 Mar 2021 10:28:29 +0100 Subject: [PATCH] Use Spree.user_class instead of Spree::LegacyUser in production code Other apps will probably have different user classes, and need to use them. --- .../migrate_default_billing_addresses_to_address_book.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/tasks/migrations/migrate_default_billing_addresses_to_address_book.rake b/core/lib/tasks/migrations/migrate_default_billing_addresses_to_address_book.rake index d441834bc46..0369769d178 100644 --- a/core/lib/tasks/migrations/migrate_default_billing_addresses_to_address_book.rake +++ b/core/lib/tasks/migrations/migrate_default_billing_addresses_to_address_book.rake @@ -6,7 +6,7 @@ namespace :solidus do task up: :environment do print "Migrating default billing addresses to address book ... " if Spree::UserAddress.where(default_billing: true).any? - Spree::LegacyUser.joins(:bill_address).update_all(bill_address_id: nil) # rubocop:disable Rails/SkipsModelValidations + Spree.user_class.joins(:bill_address).update_all(bill_address_id: nil) # rubocop:disable Rails/SkipsModelValidations end adapter_type = Spree::Base.connection.adapter_name.downcase.to_sym if adapter_type == :mysql2