Displaying 1 result from an estimated 1 matches for "sessioncart".
2009 Feb 18
3
wrong number of arguments (1 for 0)
...ler.rb:36:in `add_to_cart''
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My controller is ...
def add_to_cart
if request.post?
product_id = params[:product_id]
quantity = params[:quantity]
account = get_account()
error)---> session[:cart] = SessionCart.new(account) if
session(:cart).nil?
session[:cart].add_product( product_id)
if quantity >= 2 and quantity <= 50
for i in 1..quantity-1
session[:cart].add_product(product_id)
end
end
flash[:notice] = ''Your order has been placed.'...