Forum: Ruby on Rails Agile arguement error

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
1bf3013a3f393eb780c2242e8cb7b360?d=identicon&s=25 ted scharff (Guest)
on 2006-01-25 18:39
(Received via mailing list)
Working my way through chapter 8 of "Agile Web Development...", 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
This topic is locked and can not be replied to.