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.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---