Use .find instead of .select().first

This commit is contained in:
Matt-Yorkley
2018-09-25 09:35:05 +01:00
parent 1d9243af19
commit e93d46e75a

View File

@@ -6,7 +6,7 @@ class PendingPayments
end
def payment_object
@order.payments.select{ |payment| payment if payment.state == 'checkout' }.first
@order.payments.find{ |payment| payment.state == 'checkout' }
end
def can_be_captured?