# AWDWR Depot App Help!

**URL:** <https://www.ruby-forum.com/t/awdwr-depot-app-help/126171>\
**Category:** Rails\
**Created:** [January 16, 2008, 12:48am UTC](https://www.ruby-forum.com/t/awdwr-depot-app-help/126171 "2008-01-16T00:48:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![tuanha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b9bd4f/32.png) [@tuanha](https://www.ruby-forum.com/u/tuanha)\
**Post date:** [January 16, 2008, 12:48am UTC](https://www.ruby-forum.com/t/awdwr-depot-app-help/126171/1 "2008-01-16T00:48:12Z")

</div>

Hi I’m working on the depot app and I’m on iteration C2 where there  
shouldn’t be multiple entries of the same item and instead there should  
be a quantity. I’ve done everything according to the book but it seems  
that when I do:

> rake db:sessions:clear

I still get the error:

NoMethodError in StoreController#add\_to\_cart

undefined method `product’ for #Product:0x506f298

Does @items still thinks that it has product objects instead of cart  
items?

I’m using Rails 1.2.

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![tuanha](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b9bd4f/32.png) [@tuanha](https://www.ruby-forum.com/u/tuanha)\
**Post date:** [February 6, 2008, 3:11pm UTC](https://www.ruby-forum.com/t/awdwr-depot-app-help/126171/2 "2008-02-06T15:11:12Z")

</div>

The section you are working on does work. You have simply made an error  
somewhere by not following the book carefully enough. I also had this  
trouble. If you are really stuck, download the books code files from the  
pragmatic website.

The version of Rails shouldn’t be an issue, but the book wants Rails  
1.2.6 (or 1.2.5, perhaps). Search in the forum for “AWDWR scaffold” and  
you’ll see that its very easy to change versions.

Tuan Huynh wrote:

> Hi I’m working on the depot app and I’m on iteration C2 where there  
> shouldn’t be multiple entries of the same item and instead there should  
> be a quantity. I’ve done everything according to the book but it seems  
> that when I do:
> 
> > rake db:sessions:clear
> 
> I still get the error:
> 
> NoMethodError in StoreController#add\_to\_cart
> 
> undefined method `product’ for #Product:0x506f298
> 
> Does @items still thinks that it has product objects instead of cart  
> items?
> 
> I’m using Rails 1.2.
> 
> Thanks in advance.
