From 6b66458bfd320df378f8948adcf448087c95767d Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Tue, 18 Feb 2020 10:42:09 +1100 Subject: [PATCH] Replace andand with new Ruby syntax --- app/services/order_payment_finder.rb | 2 +- app/views/spree/shared/_order_details.html.haml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/services/order_payment_finder.rb b/app/services/order_payment_finder.rb index 7011941cf7..7040db3c6c 100644 --- a/app/services/order_payment_finder.rb +++ b/app/services/order_payment_finder.rb @@ -7,6 +7,6 @@ module OrderPaymentFinder # any overhead compared to `order(:updated_at)`. # # Using `last` without sort is not deterministic. - order.payments.sort_by(&:updated_at).last.andand.payment_method + order.payments.sort_by(&:updated_at).last&.payment_method end end diff --git a/app/views/spree/shared/_order_details.html.haml b/app/views/spree/shared/_order_details.html.haml index 2a9c6ee266..22c8ccdf8f 100644 --- a/app/views/spree/shared/_order_details.html.haml +++ b/app/views/spree/shared/_order_details.html.haml @@ -13,9 +13,9 @@ .pad .text-big = t :order_payment - %strong= OrderPaymentFinder.last_payment_method(order).andand.name + %strong= OrderPaymentFinder.last_payment_method(order)&.name %p.text-small.text-skinny.pre-line - %em= OrderPaymentFinder.last_payment_method(order).andand.description + %em= OrderPaymentFinder.last_payment_method(order)&.description .order-summary.text-small %strong