From 4414a3f28755ca8cff89c44f13eb8212218cfdca Mon Sep 17 00:00:00 2001 From: Steve Pettitt Date: Sat, 9 Apr 2016 10:05:45 +0100 Subject: [PATCH] Fix spelling mistake --- app/models/spree/user_decorator.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/spree/user_decorator.rb b/app/models/spree/user_decorator.rb index 17473fd521..10a1c28972 100644 --- a/app/models/spree/user_decorator.rb +++ b/app/models/spree/user_decorator.rb @@ -55,7 +55,7 @@ Spree.user_class.class_eval do end # Returns orders and their associated payments for all distributors that have been ordered from - def compelete_orders_by_distributor + def complete_orders_by_distributor Enterprise .includes(distributed_orders: { payments: :payment_method }) .where(enterprises: { id: enterprises_ordered_from }, @@ -65,7 +65,7 @@ Spree.user_class.class_eval do def orders_by_distributor # Remove uncompleted payments as these will not be reflected in order balance - data_array = compelete_orders_by_distributor.to_a + data_array = complete_orders_by_distributor.to_a remove_uncompleted_payments(data_array) data_array.sort! { |a, b| b.distributed_orders.length <=> a.distributed_orders.length } end