From 87b5c24cabc15fb37717e95a5a48e370759e8a9a Mon Sep 17 00:00:00 2001 From: Edwin Cruz Date: Mon, 15 Jan 2024 13:16:10 -0600 Subject: [PATCH] Use Order#email to show the order's email in new admin `spree_orders` table has the column `email` which stores the email of guest orders or users email for non guest orders. We should use that in the new admin to display the email so that guest orders work as well. (cherry picked from commit 93abf41adaa4df328c7d52f14da92c43d3bdf75a) --- admin/app/components/solidus_admin/orders/index/component.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/app/components/solidus_admin/orders/index/component.rb b/admin/app/components/solidus_admin/orders/index/component.rb index 6f15d11dd9b..7321db4c0cc 100644 --- a/admin/app/components/solidus_admin/orders/index/component.rb +++ b/admin/app/components/solidus_admin/orders/index/component.rb @@ -74,7 +74,7 @@ def customer_column class_name: "w-[400px]", header: :customer, data: ->(order) do - customer_email = order.user&.email + customer_email = order.email content_tag :div, String(customer_email) end }