Module: Stall::ArchivedPaidCartHelper
- Included in:
- Checkout::PaymentReturnCheckoutStep
- Defined in:
- lib/stall/archived_paid_cart_helper.rb
Instance Method Summary collapse
- #archivable_cart?(cart) ⇒ Boolean
- #archive_paid_cart_cookie(identifier) ⇒ Object
- #archived_paid_cart ⇒ Object
- #archived_paid_cart? ⇒ Boolean
Instance Method Details
#archivable_cart?(cart) ⇒ Boolean
16 17 18 |
# File 'lib/stall/archived_paid_cart_helper.rb', line 16 def archivable_cart?(cart) !cart.active? && cart.token != archived_paid_cart_token end |
#archive_paid_cart_cookie(identifier) ⇒ Object
11 12 13 14 |
# File 'lib/stall/archived_paid_cart_helper.rb', line 11 def (identifier) .delete(cart_key(identifier)) (current_cart.identifier, current_cart, namespace: :paid) end |
#archived_paid_cart ⇒ Object
3 4 5 |
# File 'lib/stall/archived_paid_cart_helper.rb', line 3 def archived_paid_cart RequestStore.store[archived_paid_cart_key] ||= load_archived_paid_cart end |
#archived_paid_cart? ⇒ Boolean
7 8 9 |
# File 'lib/stall/archived_paid_cart_helper.rb', line 7 def archived_paid_cart? !!archived_paid_cart end |