Agile arguement error


#1

Working my way through chapter 8 of “Agile Web D…”, I’m
getting the following error when clicking the add_to_cart button.

ArgumentError in Store#add_to_cart
wrong number of arguments (0 for 1)

What am I doing wrong? I know it’s got to be some thing stupid.

Request:
Parameters: {“id”=>“1”}

session dump:

:cart: !ruby/object:Cart
items: []
total_price: 0.0
flash: !ruby/hash:ActionController::Flash::FlashHash {}

and the method def:

def add_to_cart
product = Product.find(params[:id])
@cart = find_cart
@cart.add_product(product)
redirect_to(:action => ‘display_cart’)
end