From d0656485d7b1852491ea5efd5ccddcd41ccfa8f4 Mon Sep 17 00:00:00 2001 From: Kristina Lim Date: Thu, 10 Oct 2019 20:38:21 +0800 Subject: [PATCH] Make report_klass in OrdersAndFulfillmentsReport compact --- .../orders_and_fulfillments_report.rb | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/open_food_network/orders_and_fulfillments_report.rb b/lib/open_food_network/orders_and_fulfillments_report.rb index 8cc3e4a064..f5b810fb18 100644 --- a/lib/open_food_network/orders_and_fulfillments_report.rb +++ b/lib/open_food_network/orders_and_fulfillments_report.rb @@ -39,14 +39,10 @@ module OpenFoodNetwork def report_klass case report_type - when SupplierTotalsReport::REPORT_TYPE - SupplierTotalsReport - when SupplierTotalsByDistributorReport::REPORT_TYPE - SupplierTotalsByDistributorReport - when DistributorTotalsBySupplierReport::REPORT_TYPE - DistributorTotalsBySupplierReport - when CustomerTotalsReport::REPORT_TYPE - CustomerTotalsReport + when SupplierTotalsReport::REPORT_TYPE then SupplierTotalsReport + when SupplierTotalsByDistributorReport::REPORT_TYPE then SupplierTotalsByDistributorReport + when DistributorTotalsBySupplierReport::REPORT_TYPE then DistributorTotalsBySupplierReport + when CustomerTotalsReport::REPORT_TYPE then CustomerTotalsReport else DefaultReport end