http://pastie.caboo.se/19069 I''ve tried this with putting the app/ of the example over mine and tried running the whole thing but still no luck. Im using Locomotive 2.0.8 Please someone help :) -- 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 -~----------~----~----~----~------~----~------~--~---
Chris.Mohr
2006-Oct-23 06:27 UTC
Re: RoR Hell. Agile Web Development book example problems
It seems that @cart.items is returning floats, not items. Maybe check out your cart model. On Oct 23, 12:22 am, Zach Inglis <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> http://pastie.caboo.se/19069 > > I''ve tried this with putting the app/ of the example over mine and tried > running the whole thing but still no luck. > > Im using Locomotive 2.0.8 > > Please someone help :) > > -- > Posted viahttp://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 -~----------~----~----~----~------~----~------~--~---
Zach Inglis
2006-Oct-23 06:54 UTC
Re: RoR Hell. Agile Web Development book example problems
Nothing jumps out at me as being wrong? http://pastie.caboo.se/19088 I know it doesn''t mind @item but when I pass it as a set of items, it doesn''t like it. -- 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 -~----------~----~----~----~------~----~------~--~---
Chris.Mohr
2006-Oct-23 07:19 UTC
Re: RoR Hell. Agile Web Development book example problems
Line 9 of line_item.rb In Ruby, a function returns the value of the last line. The for_product function is returning the product.price, instead of the item. You want to add a line to return the item itself: def self.for_product(product) item = self.new item.quantity = 1 item.product = product item.unit_price = product.price item end --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Zach Inglis
2006-Oct-23 19:41 UTC
Re: RoR Hell. Agile Web Development book example problems
Brilliant. That''s defiantely helped. I''m now getting... undefined local variable or method `product'' So how should I pass the product across from the model to my controller? -- 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 -~----------~----~----~----~------~----~------~--~---
Zach Inglis
2006-Oct-23 20:25 UTC
Re: RoR Hell. Agile Web Development book example problems
Getting error at: 6: product.item_product -- 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 -~----------~----~----~----~------~----~------~--~---