mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Replace andand with new Ruby syntax
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user