mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Avoid ternary operator
This commit is contained in:
committed by
Matt-Yorkley
parent
f9b0798c88
commit
68e4d55f80
@@ -42,7 +42,8 @@ module CheckoutCallbacks
|
||||
end
|
||||
|
||||
def load_saved_credit_cards
|
||||
@saved_credit_cards = spree_current_user ? spree_current_user.credit_cards.with_payment_profile.all : []
|
||||
@saved_credit_cards = [] if !spree_current_user
|
||||
@saved_credit_cards = spree_current_user.credit_cards.with_payment_profile.all if spree_current_user
|
||||
@selected_card = nil
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user