Hello everyone, I''m a complete Rails newbie who is currently working my way through the Agile Web Dev with Rails book. I''ve reached the chapter on creating the shopping cart (chapter 8). I keep having a problem with the same error which I can''t get past, however what''s more confusing is that it''s being generated even when I swap all my app code out for the code that I downloaded from the book''s website. When I try to add an item to the cart (http://192.168.1.7:3000/store/add_to_cart/1) I get the following error: - - Unknown action No action responded to add_to_cart -- If I try to display the cart instead (http://192.168.1.7:3000/store/display_cart) I get this: -- Unknown action No action responded to display_cart -- As far as I can see everything I need is in place. Thanks, Tig
is the add_to_cart method on your store_controller? is it below a private declaration? On 9/2/05, Keith Tait <kierto-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hello everyone, > > I''m a complete Rails newbie who is currently working my way through > the Agile Web Dev with Rails book. I''ve reached the chapter on > creating the shopping cart (chapter 8). > > I keep having a problem with the same error which I can''t get past, > however what''s more confusing is that it''s being generated even when I > swap all my app code out for the code that I downloaded from the > book''s website. > > When I try to add an item to the cart > (http://192.168.1.7:3000/store/add_to_cart/1) I get the following > error: > > - - > Unknown action > No action responded to add_to_cart > -- > > If I try to display the cart instead > (http://192.168.1.7:3000/store/display_cart) I get this: > > -- > Unknown action > No action responded to display_cart > -- > > As far as I can see everything I need is in place. > > Thanks, > Tig > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Yes the add_to_cart method is there as is the display_cart method. I''m using the code straight out of the book. On 2 Sep 2005, at 18:42, Ken Barker wrote:> is the add_to_cart method on your store_controller? > > is it below a private declaration? > > On 9/2/05, Keith Tait <kierto-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > >> Hello everyone, >> >> I''m a complete Rails newbie who is currently working my way through >> the Agile Web Dev with Rails book. I''ve reached the chapter on >> creating the shopping cart (chapter 8). >> >> I keep having a problem with the same error which I can''t get past, >> however what''s more confusing is that it''s being generated even >> when I >> swap all my app code out for the code that I downloaded from the >> book''s website. >> >> When I try to add an item to the cart >> (http://192.168.1.7:3000/store/add_to_cart/1) I get the following >> error: >> >> - - >> Unknown action >> No action responded to add_to_cart >> -- >> >> If I try to display the cart instead >> (http://192.168.1.7:3000/store/display_cart) I get this: >> >> -- >> Unknown action >> No action responded to display_cart >> -- >> >> As far as I can see everything I need is in place. >> >> Thanks, >> Tig >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> >> > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Wagner Narde
2005-Sep-03 18:15 UTC
Re: Error has me stumped (Agile Web Dev with Rails book)
is the "model :cart" and "model :line_item" on your ApplicationController ? On 9/3/05, Keith Tait <kierto-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Yes the add_to_cart method is there as is the display_cart method. > I''m using the code straight out of the book. > > On 2 Sep 2005, at 18:42, Ken Barker wrote: > > > is the add_to_cart method on your store_controller? > > > > is it below a private declaration? > > > > On 9/2/05, Keith Tait <kierto-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > >> Hello everyone, > >> > >> I''m a complete Rails newbie who is currently working my way through > >> the Agile Web Dev with Rails book. I''ve reached the chapter on > >> creating the shopping cart (chapter 8). > >> > >> I keep having a problem with the same error which I can''t get past, > >> however what''s more confusing is that it''s being generated even > >> when I > >> swap all my app code out for the code that I downloaded from the > >> book''s website. > >> > >> When I try to add an item to the cart > >> (http://192.168.1.7:3000/store/add_to_cart/1) I get the following > >> error: > >> > >> - - > >> Unknown action > >> No action responded to add_to_cart > >> -- > >> > >> If I try to display the cart instead > >> (http://192.168.1.7:3000/store/display_cart) I get this: > >> > >> -- > >> Unknown action > >> No action responded to display_cart > >> -- > >> > >> As far as I can see everything I need is in place. > >> > >> Thanks, > >> Tig > >> _______________________________________________ > >> Rails mailing list > >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > >> http://lists.rubyonrails.org/mailman/listinfo/rails > >> > >> > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Wagner Narde wnarde-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails