I''m running across the exact same problem that Nick Rowlands did on this mailing list back in July...basically following the instructions in the book, when adding a duplicate item to the cart, it will always create a new LineItem, instead of simply incrementing the quantity. See: http://article.gmane.org/gmane.comp.lang.ruby.rails/15479 Nick mentioned in his thread that there was an errata stating that skipping pg. 81 in the book (as recommeded in the book itself) will cause this problem even if you''re using Rails 0.13.1 or later, and I found the same to be true. Going back and adding the model information to app/controllers/application.rb file fixed it up for me as well. The problem is that the errata is no longer listed on the book''s errata page. I imagine it was removed due to the authors thinking it had been fixed. Am I the only one who has experienced this issue? I''m running everything on a Windows XP box right now, with Ruby version 1.8.2, and Rails version 0.13.1 -------------------------------------------------- Aaron Schaefer http://elasticdog.com/ _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On Sep 11, 2005, at 11:07 PM, Aaron Schaefer wrote:> Nick mentioned in his thread that there was an errata stating that > skipping pg. 81 in the book (as recommeded in the book itself) will > cause this problem even if you''re using Rails 0.13.1 or later, and > I found the same to be true. Going back and adding the model > information to app/controllers/application.rb file fixed it up for > me as well. The problem is that the errata is no longer listed on > the book''s errata page. I imagine it was removed due to the > authors thinking it had been fixed. Am I the only one who has > experienced this issue?The original errata was fixed, and introduced the second problem. Basically I''m going to back out the change that suggests the model line isn''t needed. I added it when .13.1 came out, but it looks as if the implementation is faulty, so it''s safest to leave the model lines in. Cheers Dave
On Sep 12, 2005, at 12:14 AM, Dave Thomas wrote:> > On Sep 11, 2005, at 11:07 PM, Aaron Schaefer wrote: > > >> Nick mentioned in his thread that there was an errata stating that >> skipping pg. 81 in the book (as recommeded in the book itself) >> will cause this problem even if you''re using Rails 0.13.1 or >> later, and I found the same to be true. Going back and adding the >> model information to app/controllers/application.rb file fixed it >> up for me as well. The problem is that the errata is no longer >> listed on the book''s errata page. I imagine it was removed due to >> the authors thinking it had been fixed. Am I the only one who has >> experienced this issue? >> > > The original errata was fixed, and introduced the second problem. > Basically I''m going to back out the change that suggests the model > line isn''t needed. I added it when .13.1 came out, but it looks as > if the implementation is faulty, so it''s safest to leave the model > lines in.OK, I just chatted with DHH: they''ll fix the bug in .13.1 by the time 1.0 hits. In the meantime, just leave the model :cart line in. Cheers Dave