Class: Store::StoreController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- Store::StoreController
show all
- Defined in:
- app/controllers/store/store_controller.rb
Instance Method Summary
collapse
Instance Method Details
#current_cart(reseller_id = nil) ⇒ Object
5
6
7
8
9
10
11
12
13
14
15
|
# File 'app/controllers/store/store_controller.rb', line 5
def current_cart(reseller_id = nil)
return @current_cart if @current_cart
@current_cart ||= Cart.find_by_id(session[:order_id])
if @current_cart.nil? || @current_cart.completed? || !@current_cart.reseller_is?(reseller_id)
create_current_cart(reseller_id)
end
@current_cart
end
|
#current_cart=(cart) ⇒ Object
17
18
19
|
# File 'app/controllers/store/store_controller.rb', line 17
def current_cart=(cart)
@current_cart = cart
end
|