Forum: Ruby on Rails Agile arguement error

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
ted scharff (Guest)
on 2006-01-25 19:39
(Received via mailing list)
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.

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
	  redirect_to(:action => 'display_cart')
This topic is locked and can not be replied to.