Ok, I already posted this a couple of hours ago, but it didn''t show up, so I am going to try again! I believe I have followed all the instructions properly and have frozen rails on the edge, but when I try to add items to the cart, the cart does not update like Ajax is supposed to. If I hit <F5>, the items are there. Hmmm... The development log shows the following: Processing StoreController#add_to_cart (for 127.0.0.1 at 2006-12-18 16:39:57) [POST] Session ID: af9f55eacb478a8c1c7d161c06a52a3d Parameters: {"commit"=>"Add to Cart", "action"=>"add_to_cart", "id"=>"2", "controller"=>"store"} [4;36;1mProduct Columns (0.000000) [0m [0;1mSHOW FIELDS FROM products [0m [4;35;1mProduct Load (0.016000) [0m [0mSELECT * FROM products WHERE (products.id = 2) [0m Rendering within layouts/store Rendering store/add_to_cart Rendered store/_cart_item (0.00000) Rendered store/_cart_item (0.00000) Rendered store/_cart (0.00000) Completed in 0.01600 (62 reqs/sec) | Rendering: 0.00000 (0%) | DB: 0.01600 (100%) | 200 OK [http://localhost/store/add_to_cart/2] I am such a newb that I am not even sure the above indicates an error. It doesn''t SAY error anywhere. Any help pointing me in the right direction is greatly appreciated! Thanks, Jee --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
On Dec 18, 2006, at 7:44 PM, Jee wrote:> Ok, I already posted this a couple of hours ago, but it didn''t show > up, > so I am going to try again! > > I believe I have followed all the instructions properly and have > frozen > rails on the edge, but when I try to add items to the cart, the cart > does not update like Ajax is supposed to. If I hit <F5>, the items > are > there. Hmmm...Have you tried downloading the code from the book''s site and running it? Assuming it runs OK (and it does here), then you can look for differences between it and your code. My bet is that there''s no javascript include directive in your layout, so the JavaScript libraries aren''t being loaded. Comparing your code with the standard code for the book is a great way to diagnose this kind of subtle issue. Cheers Dave --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Conrad Taylor
2006-Dec-31 06:04 UTC
Re: Agile WebDev: Iteration D1: Ajax malfunction Take 2
Hi, did you execute the ''rake rails:update'' after freezing? -Conrad On 12/18/06, Jee <silver.raspberries-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Ok, I already posted this a couple of hours ago, but it didn''t show up, > so I am going to try again! > > I believe I have followed all the instructions properly and have frozen > rails on the edge, but when I try to add items to the cart, the cart > does not update like Ajax is supposed to. If I hit <F5>, the items are > there. Hmmm... > > The development log shows the following: > Processing StoreController#add_to_cart (for 127.0.0.1 at 2006-12-18 > 16:39:57) [POST] > Session ID: af9f55eacb478a8c1c7d161c06a52a3d > Parameters: {"commit"=>"Add to Cart", "action"=>"add_to_cart", > "id"=>"2", "controller"=>"store"} > [4;36;1mProduct Columns (0.000000) [0m [0;1mSHOW FIELDS FROM > products [0m > [4;35;1mProduct Load (0.016000) [0m [0mSELECT * FROM products > WHERE (products.id = 2) [0m > Rendering within layouts/store > Rendering store/add_to_cart > Rendered store/_cart_item (0.00000) > Rendered store/_cart_item (0.00000) > Rendered store/_cart (0.00000) > Completed in 0.01600 (62 reqs/sec) | Rendering: 0.00000 (0%) | DB: > 0.01600 (100%) | 200 OK [http://localhost/store/add_to_cart/2] > > I am such a newb that I am not even sure the above indicates an error. > It doesn''t SAY error anywhere. > Any help pointing me in the right direction is greatly appreciated! > Thanks, > Jee > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---