diff --git a/app/controllers/spree/users_controller.rb b/app/controllers/spree/users_controller.rb index a591e20064..18effc349d 100644 --- a/app/controllers/spree/users_controller.rb +++ b/app/controllers/spree/users_controller.rb @@ -14,7 +14,7 @@ module Spree def show @payments_requiring_action = PaymentsRequiringAction.new(spree_current_user).query - @orders = orders_collection + @orders = orders_collection.includes(:line_items) customers = spree_current_user.customers @shops = Enterprise diff --git a/app/views/spree/users/show.html.haml b/app/views/spree/users/show.html.haml index c85ae06d75..6fa0d875e2 100644 --- a/app/views/spree/users/show.html.haml +++ b/app/views/spree/users/show.html.haml @@ -1,5 +1,5 @@ - content_for :injection_data do - = inject_json_array("orders", @orders.all.includes(:line_items), Api::OrderSerializer) + = inject_json_array("orders", @orders.all, Api::OrderSerializer) = inject_json_array("shops", @shops.all, Api::ShopForOrdersSerializer) = inject_saved_credit_cards