Module: Stall::CartHelper
- Extended by:
- ActiveSupport::Concern
- Included in:
- Stall::Checkout::PaymentReturnCheckoutStep
- Defined in:
- lib/stall/cart_helper.rb
Instance Method Summary collapse
Instance Method Details
#current_cart ⇒ Object
17 18 19 |
# File 'lib/stall/cart_helper.rb', line 17 def current_cart RequestStore.store[cart_key] ||= load_current_cart end |
#current_customer ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/stall/cart_helper.rb', line 21 def current_customer @current_customer ||= if stall_user_signed_in? if (customer = current_stall_user.customer) customer else current_stall_user.create_customer(email: current_stall_user.email) end end end |