Replace andand with new Ruby syntax

This commit is contained in:
Maikel Linke
2020-02-18 10:42:09 +11:00
parent 3e0a5bac6a
commit 6b66458bfd
2 changed files with 3 additions and 3 deletions

View File

@@ -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

View File

@@ -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